FormControlBehavior
This is a base class for a behavior that can be associated with a RadFormControlBase instance. The behavior defines the behavior and appearance of the form.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class FormControlBehavior : Component, IComponent, IDisposable
Inheritance: objectMarshalByRefObjectComponentFormControlBehavior
Derived Classes:
Implements:
Constructors
Creates an instance of the RadFormBehaviorBase class. This instance has no Form associated with it.
public FormControlBehavior()
Creates an instance of the RadFormBehavior class.
public FormControlBehavior(IComponentTreeHandler targetTreeHandler, bool handleCreateChildItems)
An implementation of the IComponentTreeHandler which this behavior applies to
handleCreateChildItemsboolCreates an instance of the RadFormBehaviorBase class.
public FormControlBehavior(IComponentTreeHandler targetTreeHandler)
An implementation of the IComponentTreeHandler which this behavior applies to
Fields
The component tree whose root form is managed by this behavior.
protected IComponentTreeHandler targetHandler
Properties
Gets the width of the form border
public abstract Padding BorderWidth { get; }
Gets the height of the caption that is drawn by the behavior.
public abstract int CaptionHeight { get; }
Gets the margin that describes the size and position of the client area.
public abstract Padding ClientMargin { get; }
Gets the RadElement instance that represents the root element containing the hierarchy that builds the visual appearance of the form.
public abstract RadElement FormElement { get; }
Methods
Invokes the associated form's base window-procedure callback when one has been registered.
protected void CallBaseWndProc(ref Message m)
The window message to pass to the base procedure.
Invokes the associated form's default window-procedure callback when one has been registered.
protected void CallDefWndProc(ref Message m)
The window message to pass to the default procedure.
Provides a hook for behaviors that take responsibility for creating the form's child elements. The form calls this method when the behavior is configured to handle child-item creation.
public virtual void CreateChildItems(RadElement parent)
The root element that receives the child items.
Adjusts the native window parameters before the form creates its handle. The base implementation returns the supplied parameters unchanged.
public virtual CreateParams CreateParams(CreateParams parameters)
The native window parameters to adjust.
Returns:The parameters used to create the form handle.
Called after the associated form's handle is created so derived behaviors can initialize handle-dependent state.
public virtual void FormHandleCreated()
Invalidates the specified element bounds using the form's behavior-specific rendering path.
public abstract void InvalidateElement(RadElement element, Rectangle bounds)
The element whose rendering changed.
boundsRectangleThe bounds to invalidate.
Gives the behavior an opportunity to paint the form's client area.
public virtual bool OnAssociatedFormPaint(PaintEventArgs args)
The paint arguments for the associated form.
Returns:true if the behavior handled painting and the form should skip its default paint path.
Gives the behavior an opportunity to paint the form's background.
public virtual bool OnAssociatedFormPaintBackground(PaintEventArgs args)
The background-paint arguments for the associated form.
Returns:true if the behavior handled painting and the form should skip its default background paint.
Occurs when a form is associated with the behavior.
protected virtual void OnFormAssociated()