Provides specialized behavior for RadRibbonForm instances, managing non-client area interaction, composition effects, and integration with RadRibbonBar controls.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadRibbonFormBehavior : RadNonClientUIBaseFormBehavior<RadRibbonBar>, IComponent, IDisposable
Inheritance: objectMarshalByRefObjectComponentFormControlBehaviorThemedFormBehaviorRadNonClientUIBaseFormBehavior<RadRibbonBar>RadRibbonFormBehavior...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadRibbonFormBehavior class with default settings.
public RadRibbonFormBehavior()
Initializes a new instance of the RadRibbonFormBehavior class with the specified component tree handler and child item creation handling configuration.
public RadRibbonFormBehavior(IComponentTreeHandler treeHandler, bool shouldHandleCreateChildItems)
The IComponentTreeHandler implementation that this behavior will be associated with.
shouldHandleCreateChildItemsboolDetermines whether this behavior should handle the CreateChildItems call for element hierarchy creation.
Initializes a new instance of the RadRibbonFormBehavior class with the specified component tree handler.
public RadRibbonFormBehavior(IComponentTreeHandler treeHandler)
The IComponentTreeHandler implementation that this behavior will be associated with.
Properties
Gets the border width thickness for the ribbon form, derived from the form element's border settings.
public override Padding BorderWidth { get; }
A Padding structure representing the thickness of the form's borders on all sides. This value is used for client area calculations and composition effect management.
Overrides:
Gets the client margin for the form, with special handling for minimized MDI child windows.
public override Padding ClientMargin { get; }
A Padding structure representing the margins between the form's edges and its client area. For minimized MDI children, the top margin is set to the form's height to effectively hide the client area.
Overrides:
Gets the RadRibbonBar control that is hosted within this form's non-client area.
protected virtual RadRibbonBar RibbonBar { get; }
The RadRibbonBar instance that serves as the primary UI control for this form, providing ribbon functionality and integration with the form's title bar.
Gets the top composition margin for DWM (Desktop Window Manager) glass effects, calculating the appropriate height based on window state and ribbon caption size.
public override int TopCompositionMargin { get; }
An integer representing the top margin in pixels that should be extended into the client area for glass composition effects. The value varies based on whether the window is maximized and whether a ribbon control is present.
Overrides:
Methods
Adjusts the behavior configuration based on the current composition state, managing form element visibility, ribbon bar composition settings, and form shape properties.
protected override void AdjustBehaviorForCompositionSate()
Overrides:
Adjusts the form element configuration based on the specified window state, managing visibility and properties of form elements for different window states.
protected override void AdjustFormElementForFormState(int? formState)
The window state constant indicating the new form state (SIZE_MAXIMIZED, SIZE_RESTORED, SIZE_MINIMIZED).
Overrides:
Determines whether this behavior can handle window procedure messages based on theming state and MDI configuration.
protected override bool CanHandleWndProc()
False if theming is allowed and the form is an MDI child; otherwise, true.
Overrides:
Creates and returns the form element that will represent the visual hierarchy for the ribbon form.
protected override RadElement CreateFormElement()
A new instance of RibbonFormElement that will manage the form's visual representation.
Overrides:
Performs cleanup of non-client UI control implementations, including disposal of ribbon form-specific menu strips.
protected override void DisposeNonClientUIControlImpls()
Overrides:
Handles form size change events to manage composition effects, window state synchronization, and form region adjustments based on the current window state and composition settings.
Initializes a dummy menu strip for the form if none exists, ensuring proper integration with Windows menu handling.
protected override void InitializeDummyMenuStrip()
Overrides:
Initializes the non-client UI control by locating and configuring the first RadRibbonBar control found in the form's control collection.
protected override void InitializeNonClientUIControl()
Overrides:
Determines whether the current ribbon configuration uses an application menu style that supports traditional menu behavior.
protected override bool IsApplicationMenu()
True if the application menu style is not BackstageView; otherwise, false.
Overrides:
Handles WM_ACTIVATE messages to manage form activation states and synchronize ribbon control and form element active states for proper visual feedback.
protected override void OnWMActivateCore(ref Message m)
The Windows message containing activation state information.
Overrides:
Handles WM_MDIACTIVATE messages for MDI child window activation, managing form active state properties and calling the base window procedure for proper MDI behavior.
Handles WM_NCLBUTTONDOWN messages to process non-client area left mouse button down events, determining whether to allow default window behavior or handle custom ribbon interactions.
protected override void OnWmNCLeftMouseButtonDown(ref Message m)
The Windows message containing mouse position and button state information.
Overrides:
Handles WM_NCLBUTTONUP messages to process non-client area left mouse button up events, managing system commands for window operations and application icon interactions.
protected override void OnWmNCLeftMouseButtonUp(ref Message m)
The Windows message containing mouse position and button state information.
Overrides:
Updates the form's configuration for the specified theming state, adjusting composition effects and applying necessary style updates.
protected override void UpdateFormForThemingState(bool showAero)
True to enable Aero composition effects; false to disable them.
Overrides:
Updates MDI button visibility and caption text synchronization between the form and ribbon control.
protected override void UpdateMDIButtonsAndCaptionText()
Overrides:
Updates the composition settings of the non-client UI control to match the current behavior state.
protected override void UpdateNCComposition()
Overrides: