ClassRadFormBehavior
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
RadFormBehavior()
Creates an instance of the RadFormBehavior class. This instance has no Form associated with it.
Declaration
public RadFormBehavior()
RadFormBehavior(IComponentTreeHandler)
Creates an instance of the RadFormBehavior class.
Declaration
public RadFormBehavior(IComponentTreeHandler treeHandler)
Parameters
treeHandler
An IComponentTreeHandler instance.
RadFormBehavior(IComponentTreeHandler, bool)
Creates an instance of the RadFormBehavior class.
Declaration
public RadFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
Parameters
treeHandler
An IComponentTreeHandler instance.
shouldCreateChildren
A flag that determines whether the CreateChildItems call is rerouted to the behavior.
Properties
AllowTheming
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.
Declaration
public override bool AllowTheming { get; set; }
Property Value
Overrides
BorderWidth
Gets the Border width of the Form.
Declaration
public override Padding BorderWidth { get; }
Property Value
Overrides
CaptionHeight
Gets the Caption Height of the Form.
Declaration
public override int CaptionHeight { get; }
Property Value
Overrides
CaptionTextBounds
Gets the rectangle that contains the form's caption text.
Declaration
public override Rectangle CaptionTextBounds { get; }
Property Value
Overrides
ClientMargin
Gets the margin that determines the position and size of the client area of the Form.
Declaration
public override Padding ClientMargin { get; }
Property Value
Overrides
FormElement
Gets the RadElement instance that represents the root element containing the hierarchy that builds the visual appearance of the form.
Declaration
public override RadElement FormElement { get; }
Property Value
Overrides
HorizontalScrollbarBounds
Gets the bounding rectangle of the horizontal scrollbar. Returns an empty rectangle if the scrollbar is not visible.
Declaration
protected virtual Rectangle HorizontalScrollbarBounds { get; }
Property Value
IconBounds
Gets the rectangle that contains the form's icon.
Declaration
public override Rectangle IconBounds { get; }
Property Value
Overrides
MenuBounds
Gets the rectangle that contains the menu of the form.
Declaration
public override Rectangle MenuBounds { get; }
Property Value
Overrides
ScrollbarSizingGripBounds
Gets the bounding rectangle of the sizing grip that appears when both scrollbars are visible.
Declaration
protected virtual Rectangle ScrollbarSizingGripBounds { get; }
Property Value
SystemButtonsBounds
Gets the rectangle that contains the system buttons of the form.
Declaration
public override Rectangle SystemButtonsBounds { get; }
Property Value
Overrides
VerticalScrollbarBounds
Gets the bounding rectangle of the vertical scrollbar. Returns an empty rectangle if the scrollbar is not visible.
Declaration
protected virtual Rectangle VerticalScrollbarBounds { get; }
Property Value
Methods
AdjustFormElementForCurrentStyles()
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.
Declaration
protected void AdjustFormElementForCurrentStyles()
AdjustFormElementForFormState(int?)
Changes the visibility of the separate items within the RadFormElement's element tree according to the current Form state.
Declaration
protected void AdjustFormElementForFormState(int? formState)
Parameters
formState
int?
The state of the Form as it comes from the WM_SIZE message
CalculateDynamicClientMargin()
Calculates the client margin based on the current form and form element settings
CreateChildItems(RadElement)
Declaration
public override void CreateChildItems(RadElement parent)
Parameters
parent
Overrides
CreateFormElement()
Declaration
protected virtual RadFormElement CreateFormElement()
Returns
CreateParams(CreateParams)
Declaration
public override CreateParams CreateParams(CreateParams parameters)
Parameters
parameters
Returns
Overrides
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
Overrides
GetDynamicCaptionHeight()
Gets the Caption Height according to the Styles applied and the current state of the form.
Declaration
protected virtual int GetDynamicCaptionHeight()
Returns
A value representing the height of the caption.
GetWindowRealNCMargin()
Gets a Padding object which represents the window NC margin according to the currently set styles.
Declaration
protected virtual Padding GetWindowRealNCMargin()
Returns
The form NC margin.
InvalidateElement(RadElement, Rectangle)
Declaration
public override void InvalidateElement(RadElement element, Rectangle bounds)
Parameters
element
bounds
Overrides
NCFromClientCoordinates(Point)
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.
OnActiveMDIChildTextChanged()
Declaration
protected override void OnActiveMDIChildTextChanged()
Overrides
OnFormAssociated()
Fires when a Form has been associated with the behavior.
Declaration
protected override void OnFormAssociated()
Overrides
OnWindowStateChanged(int, int)
Fires when the window state of the form is changed. Uses the SIZE_* values to define the window states.
SynchronizeHorizontalScrollbarState()
Calculates the bounding rectangle of the horizontal scrollbar.
Declaration
protected virtual Rectangle SynchronizeHorizontalScrollbarState()
Returns
An instance of the Rectangle struct that represents the position and the size of the horizontal scrollbar.
SynchronizeHorizontalScrollbarValues()
This method synchronizes the values of the standard horizontal scrollbar with the RadScrollBarElement in the Form's element hierarchy.
Declaration
protected virtual void SynchronizeHorizontalScrollbarValues()
SynchronizeScrollbarsValues()
Declaration
protected void SynchronizeScrollbarsValues()
SynchronizeVerticalScrollbarState()
Calculates the bounding rectangle of the vertical scrollbar.
Declaration
protected virtual Rectangle SynchronizeVerticalScrollbarState()
Returns
An instance of the Rectangle struct that represents the position and the size of the vertical scrollbar
SynchronizeVerticalScrollbarValues()
This method synchronizes the values of the standard vertical scrollbar with the RadScrollBarElement in the Form's element hierarchy.
Declaration
protected virtual void SynchronizeVerticalScrollbarValues()