Class RadFormBehavior
A standard behavior for RadForm.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadFormBehavior : ThemedFormBehavior
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
IComponentTreeHandler
treeHandler
An IComponentTreeHandler instance. |
RadFormBehavior(IComponentTreeHandler, Boolean)
Creates an instance of the RadFormBehavior class.
Declaration
public RadFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
Parameters
IComponentTreeHandler
treeHandler
An IComponentTreeHandler instance. |
System.Boolean
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
System.Boolean
|
Overrides
BorderWidth
Gets the Border width of the Form.
Declaration
public override Padding BorderWidth { get; }
Property Value
System.Windows.Forms.Padding
|
Overrides
CaptionHeight
Gets the Caption Height of the Form.
Declaration
public override int CaptionHeight { get; }
Property Value
System.Int32
|
Overrides
CaptionTextBounds
Declaration
public override Rectangle CaptionTextBounds { get; }
Property Value
System.Drawing.Rectangle
|
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
System.Windows.Forms.Padding
|
Overrides
FormElement
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
System.Drawing.Rectangle
|
IconBounds
Declaration
public override Rectangle IconBounds { get; }
Property Value
System.Drawing.Rectangle
|
Overrides
MenuBounds
Declaration
public override Rectangle MenuBounds { get; }
Property Value
System.Drawing.Rectangle
|
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
System.Drawing.Rectangle
|
SystemButtonsBounds
Declaration
public override Rectangle SystemButtonsBounds { get; }
Property Value
System.Drawing.Rectangle
|
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
System.Drawing.Rectangle
|
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(Nullable<Int32>)
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
System.Nullable<System.Int32>
formState
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
Declaration
public virtual Padding CalculateDynamicClientMargin()
Returns
System.Windows.Forms.Padding
|
CreateChildItems(RadElement)
Declaration
public override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
CreateFormElement()
CreateParams(CreateParams)
Declaration
public override CreateParams CreateParams(CreateParams parameters)
Parameters
System.Windows.Forms.CreateParams
parameters
|
Returns
System.Windows.Forms.CreateParams
|
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
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
System.Int32
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
System.Windows.Forms.Padding
The form NC margin. |
HandleWndProc(ref Message)
Declaration
public override bool HandleWndProc(ref Message m)
Parameters
System.Windows.Forms.Message
m
|
Returns
System.Boolean
|
Overrides
InvalidateElement(RadElement, Rectangle)
Declaration
public override void InvalidateElement(RadElement element, Rectangle bounds)
Parameters
RadElement
element
|
System.Drawing.Rectangle
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.
Declaration
protected virtual Point NCFromClientCoordinates(Point clientCoordinates)
Parameters
System.Drawing.Point
clientCoordinates
A point in client coordinates. |
Returns
System.Drawing.Point
The point in NC coordinates. |
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(Int32, Int32)
Declaration
protected override void OnWindowStateChanged(int currentFormState, int newFormState)
Parameters
System.Int32
currentFormState
|
System.Int32
newFormState
|
Overrides
SynchronizeHorizontalScrollbarState()
Calculates the bounding rectangle of the horizontal scrollbar.
Declaration
protected virtual Rectangle SynchronizeHorizontalScrollbarState()
Returns
System.Drawing.Rectangle
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
System.Drawing.Rectangle
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()