New to Telerik UI for WinForms? Start a free 30-day trial

Implements the non-client layout, input, and window-state behavior for a RadToolbarForm.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class RadToolbarFormBehavior : RadNonClientUIBaseFormBehavior<RadToolbarFormControl>, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentFormControlBehaviorThemedFormBehaviorRadNonClientUIBaseFormBehavior<RadToolbarFormControl>RadToolbarFormBehavior...

Implements: IComponentIDisposable

Inherited Members RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.RegionHeightEllipseRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.MaxFormBorderHeightRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.capturedNCItemRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.Dispose(bool)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.DisposeNonClientUIControlImpls()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CreateChildItems(RadElement)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CreateParams(CreateParams)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.HandleWndProc(ref Message)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CanHandleParentNotify(ref Message)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWmParentNotifyInDesigner(ref Message)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CanHandleWndProc()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.UpdateMDIButtonsAndCaptionText()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.AdjustSystemButtonsForStyle()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.AdjustFormIconVisibility()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.IsApplicationMenu()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWmMDIActivate(ref Message)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWmSetIcon(ref Message)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnGetMinMaxInfo(MinMaxInfo)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnActiveMDIChildTextChanged()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.FormHandleCreated()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnAssociatedFormPaintBackground(PaintEventArgs)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnFormAssociated()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.InitializeDummyMenuStrip()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.Form_Load(object, EventArgs)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.Form_ControlAdded(object, ControlEventArgs)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.NCFromClientCoordinates(Point)RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.ExtendFrameIntoClientArea()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.ResetFormRegion()RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.NonClientUIControlRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.FormElementRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.ClientMarginRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CaptionHeightRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CompositionEnabledRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.AllowThemingRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.MenuBoundsRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.IconBoundsRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CaptionTextBoundsRadNonClientUIBaseFormBehavior<RadToolbarFormControl>.SystemButtonsBoundsThemedFormBehavior.GetMappedWindowPoint(Point)ThemedFormBehavior.GetMaximumFormHeightAccordingToCurrentScreen()ThemedFormBehavior.OnWindowStateChanged(int, int)ThemedFormBehavior.RefreshNC()ThemedFormBehavior.InvalidateNC(Rectangle)ThemedFormBehavior.OnNCPaint(Graphics)ThemedFormBehavior.PaintElement(IGraphics, Rectangle, VisualElement)ThemedFormBehavior.InvalidateElement(RadElement, Rectangle)ThemedFormBehavior.IsMaximizedThemedFormBehavior.IsMinimizedThemedFormBehavior.IsNormalThemedFormBehavior.CurrentFormStateThemedFormBehavior.IsMdiChildMaximizedThemedFormBehavior.FormMdiClientThemedFormBehavior.IsMenuInFormThemedFormBehavior.MainMenuInFormThemedFormBehavior.MaximizedMDIChildThemedFormBehavior.TopResizeFrameThemedFormBehavior.TopLeftResizeFrameThemedFormBehavior.LeftResizeFrameThemedFormBehavior.BottomLeftResizeFrameThemedFormBehavior.BottomResizeFrameThemedFormBehavior.BottomRightResizeFrameThemedFormBehavior.RightResizeFrameThemedFormBehavior.TopRightResizeFrameThemedFormBehavior.CaptionFrameThemedFormBehavior.LeftBorderFrameThemedFormBehavior.BottomBorderFrameThemedFormBehavior.RightBorderFrameThemedFormBehavior.ClientFrameThemedFormBehavior.CurrentFormParamsThemedFormBehavior.FormFormControlBehavior.targetHandlerFormControlBehavior.CallBaseWndProc(ref Message)FormControlBehavior.CallDefWndProc(ref Message)FormControlBehavior.OnAssociatedFormPaint(PaintEventArgs)...

Constructors

Initializes the behavior without a component-tree handler; a handler can be supplied through another constructor.

C#
public RadToolbarFormBehavior()

Creates an instance of the RadToolbarFormBehavior class.

C#
public RadToolbarFormBehavior(IComponentTreeHandler treeHandler, bool shouldHandleCreateChildItems)
Parameters:treeHandlerIComponentTreeHandler

The associated IComponentTreeHandler implementation.

shouldHandleCreateChildItemsbool

Determines whether the behavior handles the CreateChildItems call.

Creates an instance of the RadToolbarFormBehavior class.

C#
public RadToolbarFormBehavior(IComponentTreeHandler treeHandler)
Parameters:treeHandlerIComponentTreeHandler

The IComponentTreeHandler implementation which this behavior is associated with.

Properties

Gets the border thickness defined by the toolbar form's visual element.

C#
public override Padding BorderWidth { get; }

Overrides: FormControlBehavior.BorderWidth

Gets whether this behavior enables composition effects. It always returns false.

C#
public bool CompositionEffectsEnabled { get; }

Gets the non-client toolbar control associated with this behavior, or null before it is initialized.

C#
protected virtual RadToolbarFormControl ToolbarFormControl { get; }

Gets the top margin reserved for the extended caption area, including the frame border when maximized. When the toolbar control is not available, the system caption and frame-border heights are used.

C#
public override int TopCompositionMargin { get; }

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.TopCompositionMargin

Methods

Makes no composition-dependent changes to the form element; this behavior reports composition effects as disabled.

C#
protected override void AdjustBehaviorForCompositionSate()

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.AdjustBehaviorForCompositionSate()

Updates the form element's window-state property for a native size-state notification and shows its border when restored or minimized.

C#
protected override void AdjustFormElementForFormState(int? formState)
Parameters:formStateint?

A Win32 SIZE_* state such as SIZE_MAXIMIZED, SIZE_RESTORED, or SIZE_MINIMIZED. Other values leave the element unchanged.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.AdjustFormElementForFormState(int?)

Creates the visual element that supplies the toolbar form's non-client border and window-state visuals.

C#
protected override RadElement CreateFormElement()
Returns:

RadElement

A new ToolbarFormElement.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.CreateFormElement()

Updates maximized-form padding, synchronizes the toolbar window-state property when the state changes, and resets the form region.

C#
protected override void Form_SizeChanged(object sender, EventArgs e)
Parameters:senderobject

The form whose size or window state changed.

eEventArgs

The event data supplied by the form's size-changed notification.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.Form_SizeChanged(object, EventArgs)

Finds the toolbar control among the form's direct child controls and assigns it as the non-client UI control.

C#
protected override void InitializeNonClientUIControl()

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.InitializeNonClientUIControl()

Updates the toolbar and form active-state properties when the form receives an activation message.

C#
protected override void OnWMActivateCore(ref Message m)
Parameters:mMessage

The WM_ACTIVATE message whose activation code determines the active state.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWMActivateCore(ref Message)

Routes a non-client left-button press to the form's visual tree and skips the base window procedure when the hit element is enabled and is not the form element.

C#
protected override void OnWmNCLeftMouseButtonDown(ref Message m)
Parameters:mMessage

The Windows message containing the non-client pointer location.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWmNCLeftMouseButtonDown(ref Message)

Performs no additional processing for a non-client left-button release.

C#
protected override void OnWmNCLeftMouseButtonUp(ref Message m)
Parameters:mMessage

The Windows message for the non-client button release.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWmNCLeftMouseButtonUp(ref Message)

Forwards a non-client right-button release to the form and posts a system-menu message when the message Y coordinate is positive and no greater than TopCompositionMargin.

C#
protected override void OnWMNCRightButtonUp(ref Message m)
Parameters:mMessage

The Windows message containing the non-client pointer location.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWMNCRightButtonUp(ref Message)

Copies the form caption text to the toolbar control and applies its ShowText visibility setting.

C#
protected override void OnWmSetText(ref Message m)
Parameters:mMessage

The WM_SETTEXT message containing the new form caption.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.OnWmSetText(ref Message)

Does not apply a separate Aero-theme transition because this behavior disables base non-client theming.

C#
protected override void UpdateFormForThemingState(bool showAero)
Parameters:showAerobool

Whether the base behavior requested Aero theming; this implementation does not apply it.

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.UpdateFormForThemingState(bool)

Does not propagate DWM composition changes to the toolbar control.

C#
protected override void UpdateNCComposition()

Overrides: RadNonClientUIBaseFormBehavior<RadToolbarFormControl>.UpdateNCComposition()