RadFormBehavior
A standard behavior for RadForm.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadFormBehavior : ThemedFormBehavior, IComponent, IDisposable
Inheritance: objectMarshalByRefObjectComponentFormControlBehaviorThemedFormBehaviorRadFormBehavior...
Implements:
Inherited Members
Constructors
Creates an instance of the RadFormBehavior class. This instance has no Form associated with it.
public RadFormBehavior()
Creates an instance of the RadFormBehavior class.
public RadFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
An IComponentTreeHandler instance.
shouldCreateChildrenboolA flag that determines whether the CreateChildItems call is rerouted to the behavior.
Creates an instance of the RadFormBehavior class.
public RadFormBehavior(IComponentTreeHandler treeHandler)
An IComponentTreeHandler instance.
Properties
Gets or sets a boolean value indicating whether the behavior paints in the NC area of the Form when OS is Vista or later and Composition is enabled.
public override bool AllowTheming { get; set; }
Overrides:
Gets the Border width of the Form.
public override Padding BorderWidth { get; }
Overrides:
Gets the Caption Height of the Form.
public override int CaptionHeight { get; }
Overrides:
Gets the rectangle that contains the form's caption text.
public override Rectangle CaptionTextBounds { get; }
Overrides:
Gets the margin that determines the position and size of the client area of the Form.
public override Padding ClientMargin { get; }
Overrides:
Gets the RadElement instance that represents the root element containing the hierarchy that builds the visual appearance of the form.
public override RadElement FormElement { get; }
Overrides:
Gets the bounding rectangle of the horizontal scrollbar. Returns an empty rectangle if the scrollbar is not visible.
protected virtual Rectangle HorizontalScrollbarBounds { get; }
Gets the rectangle that contains the form's icon.
public override Rectangle IconBounds { get; }
Overrides:
Gets the rectangle that contains the menu of the form.
public override Rectangle MenuBounds { get; }
Overrides:
Gets the bounding rectangle of the sizing grip that appears when both scrollbars are visible.
protected virtual Rectangle ScrollbarSizingGripBounds { get; }
Gets the rectangle that contains the system buttons of the form.
public override Rectangle SystemButtonsBounds { get; }
Overrides:
Gets the bounding rectangle of the vertical scrollbar. Returns an empty rectangle if the scrollbar is not visible.
protected virtual Rectangle VerticalScrollbarBounds { get; }
Methods
This method adjusts the FormElement according to the styles currently applied to the Form. For example, the MinimizeButton, MaximizeButton and CloseButton in the Title Bar are enabled/disabled according to whether the corresponding window style is applied.
protected void AdjustFormElementForCurrentStyles()
Changes the visibility of the separate items within the RadFormElement's element tree according to the current Form state.
protected void AdjustFormElementForFormState(int? formState)
The state of the Form as it comes from the WM_SIZE message
Calculates the client margin based on the current form and form element settings
public override CreateParams CreateParams(CreateParams parameters)
Overrides:
Gets the Caption Height according to the Styles applied and the current state of the form.
protected virtual int GetDynamicCaptionHeight()
A value representing the height of the caption.
Gets a Padding object which represents the window NC margin according to the currently set styles.
public override void InvalidateElement(RadElement element, Rectangle bounds)
Overrides:
This method translates a point which is in client coordinates to a point in NC coordinates. Used when the Form has captured the mouse and NC mouse events have to be processed.
protected override void OnActiveMDIChildTextChanged()
Overrides:
Fires when a Form has been associated with the behavior.
protected override void OnFormAssociated()
Overrides:
Fires when the window state of the form is changed. Uses the SIZE_* values to define the window states.
Calculates the bounding rectangle of the horizontal scrollbar.
protected virtual Rectangle SynchronizeHorizontalScrollbarState()
An instance of the Rectangle struct that represents the position and the size of the horizontal scrollbar.
This method synchronizes the values of the standard horizontal scrollbar with the RadScrollBarElement in the Form's element hierarchy.
protected virtual void SynchronizeHorizontalScrollbarValues()
protected void SynchronizeScrollbarsValues()
Calculates the bounding rectangle of the vertical scrollbar.
protected virtual Rectangle SynchronizeVerticalScrollbarState()
An instance of the Rectangle struct that represents the position and the size of the vertical scrollbar
This method synchronizes the values of the standard vertical scrollbar with the RadScrollBarElement in the Form's element hierarchy.
protected virtual void SynchronizeVerticalScrollbarValues()