Class ThemedFormBehavior
This class represents a base class for all behaviors that modify the non-client area of the form and enable custom painting in it.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public abstract class ThemedFormBehavior : FormControlBehavior
Constructors
ThemedFormBehavior()
Creates an instance of the ThemedFormBehavior class.
Declaration
public ThemedFormBehavior()
ThemedFormBehavior(IComponentTreeHandler)
Creates an instance of the RadFormBehavior class.
Declaration
public ThemedFormBehavior(IComponentTreeHandler treeHandler)
Parameters
IComponent An IComponentTreeHandler instance. |
ThemedFormBehavior(IComponentTreeHandler, Boolean)
Creates an instance of the RadFormBehavior class.
Declaration
public ThemedFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
Parameters
IComponent An IComponentTreeHandler instance. |
System. A flag that determines whether the CreateChildItems call is rerouted to the behavior. |
Properties
AllowTheming
Gets or sets a bool value indiciating whether the behavior applies NC theming to the form.
Declaration
public abstract bool AllowTheming { get; set; }
Property Value
System.
|
BottomBorderFrame
This rectangle represents the bottom border frame of a window.
Declaration
public virtual Rectangle BottomBorderFrame { get; }
Property Value
System.
|
BottomLeftResizeFrame
This rectangle represents the bottomleft sizing corner of a window.
Declaration
public virtual Rectangle BottomLeftResizeFrame { get; }
Property Value
System.
|
BottomResizeFrame
This rectangle represents the bottom sizing frame of a window.
Declaration
public virtual Rectangle BottomResizeFrame { get; }
Property Value
System.
|
BottomRightResizeFrame
This rectangle represents the bottomright sizing corner of a window.
Declaration
public virtual Rectangle BottomRightResizeFrame { get; }
Property Value
System.
|
CaptionFrame
This rectangle represents the caption frame of a window.
Declaration
public virtual Rectangle CaptionFrame { get; }
Property Value
System.
|
CaptionTextBounds
Gets the rectangle that contains the form's caption text.
Declaration
public abstract Rectangle CaptionTextBounds { get; }
Property Value
System.
|
ClientFrame
This rectangle represents the client rectangle of a window.
Declaration
public virtual Rectangle ClientFrame { get; }
Property Value
System.
|
CurrentFormParams
Gets the current form CreateParams settings.
Declaration
public virtual CreateParams CurrentFormParams { get; }
Property Value
System.
|
CurrentFormState
Gets an integer value that determines the current Form state: Possible values come from the SIZE_RESTORED, SIZE_MAXIMIZED, SIZE_MINIMIZED win32 constants.
Declaration
protected int CurrentFormState { get; }
Property Value
System.
|
Form
Gets or sets the form associated with this behavior. Used only in design-time. IMPORTANT: This property can be assigned only one time. An InvalidOperationException is thrown when the property is assigned more than once.
Declaration
public RadFormControlBase Form { get; set; }
Property Value
FormMdiClient
Gets the MdiClient control of the Form. Returns null if the Form is not MdiContainer.
Declaration
protected MdiClient FormMdiClient { get; }
Property Value
System.
|
IconBounds
Gets the rectangle that contains the form's icon.
Declaration
public abstract Rectangle IconBounds { get; }
Property Value
System.
|
IsMaximized
Gets a bool value that determines whether the Form's window state is maximized.
Declaration
protected virtual bool IsMaximized { get; }
Property Value
System.
|
IsMdiChildMaximized
Gets a boolean value showing whether a MDI child form is maximized.
Declaration
protected virtual bool IsMdiChildMaximized { get; }
Property Value
System.
|
IsMenuInForm
Gets a boolean value determining whether there is a Menu in the Form.
Declaration
protected bool IsMenuInForm { get; }
Property Value
System.
|
IsMinimized
Gets a bool value that determines whether the Form's window state is minimized.
Declaration
protected virtual bool IsMinimized { get; }
Property Value
System.
|
IsNormal
Gets a boolean value that determines whether the Form's window state is normal.
Declaration
protected virtual bool IsNormal { get; }
Property Value
System.
|
LeftBorderFrame
This rectangle represents the left border frame of a window.
Declaration
public virtual Rectangle LeftBorderFrame { get; }
Property Value
System.
|
LeftResizeFrame
This rectangle represents the left sizing frame of a window.
Declaration
public virtual Rectangle LeftResizeFrame { get; }
Property Value
System.
|
MainMenuInForm
MaximizedMDIChild
Gets the maximized MDI child if any.
Declaration
protected Form MaximizedMDIChild { get; }
Property Value
System.
|
MenuBounds
Gets the rectangle that contains the menu of the form.
Declaration
public abstract Rectangle MenuBounds { get; }
Property Value
System.
|
RightBorderFrame
This rectangle represents the right border frame of a window.
Declaration
public virtual Rectangle RightBorderFrame { get; }
Property Value
System.
|
RightResizeFrame
This rectangle represents the right sizing frame of a window.
Declaration
public virtual Rectangle RightResizeFrame { get; }
Property Value
System.
|
SystemButtonsBounds
Gets the rectangle that contains the system buttons of the form.
Declaration
public abstract Rectangle SystemButtonsBounds { get; }
Property Value
System.
|
TopLeftResizeFrame
This rectangle represents the topleft sizing corner of a window.
Declaration
public virtual Rectangle TopLeftResizeFrame { get; }
Property Value
System.
|
TopResizeFrame
This rectangle represents the top sizing frame of a window.
Declaration
public virtual Rectangle TopResizeFrame { get; }
Property Value
System.
|
TopRightResizeFrame
This rectangle represents the topright sizing corner of a window.
Declaration
public virtual Rectangle TopRightResizeFrame { get; }
Property Value
System.
|
Methods
CreateParams(CreateParams)
Declaration
public override CreateParams CreateParams(CreateParams parameters)
Parameters
System.
|
Returns
System.
|
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.
|
Overrides
GetMappedWindowPoint(Point)
This method transforms screen coordinates into local coordinates.
Declaration
protected virtual Point GetMappedWindowPoint(Point screenPoint)
Parameters
System. The screen point to transform. |
Returns
System. The transformed point. If the handle of the associated Form is not created, the method returns the input. |
GetMaximumFormHeightAccordingToCurrentScreen()
This method returns the maximum available height according to the current position of the form in multi-monitor setup.
Declaration
protected int GetMaximumFormHeightAccordingToCurrentScreen()
Returns
System.
|
HandleWndProc(ref Message)
Declaration
public override bool HandleWndProc(ref Message m)
Parameters
System.
|
Returns
System.
|
Overrides
InvalidateElement(RadElement, Rectangle)
Declaration
public override void InvalidateElement(RadElement element, Rectangle bounds)
Parameters
Rad
|
System.
|
Overrides
InvalidateNC(Rectangle)
Invalidates the specified bounds in the non-client area of the form this behavior is associated with.
Declaration
protected virtual void InvalidateNC(Rectangle bounds)
Parameters
System.
|
OnActiveMDIChildTextChanged()
Declaration
protected virtual void OnActiveMDIChildTextChanged()
OnFormAssociated()
Declaration
protected override void OnFormAssociated()
Overrides
OnGetMinMaxInfo(MinMaxInfo)
This event is fired when the WM_GETMINMAXINFO message is sent to the form.
Declaration
protected virtual void OnGetMinMaxInfo(MinMaxInfo minMaxInfo)
Parameters
Min Contains information about the position, maximum/minimum size of the form etc. Can be modified to adjust the settings applied to the form. |
OnNCPaint(Graphics)
This event is fired when the WM_NCPAINT message is sent to the form.
Declaration
protected virtual void OnNCPaint(Graphics graphics)
Parameters
System. The NC Graphics. |
OnWindowStateChanged(Int32, Int32)
Fires when the window state of the form is changed. Uses the SIZE_* values to define the window states.
Declaration
protected virtual void OnWindowStateChanged(int currentFormState, int newFormState)
Parameters
System. The old window state of the form. |
System. The new window state of the form |
PaintElement(IGraphics, Rectangle, VisualElement)
Paints an element on a specified graphics.
Declaration
protected virtual void PaintElement(IGraphics graphics, Rectangle clipRectangle, VisualElement element)
Parameters
IGraphics
graphics
The Graphics object to paint on. |
System. The clipping rectangle. |
Visual The element to paint. |
RefreshNC()
Immediately refreshes the whole non-client area of the form which this behavior is associated with.
Declaration
protected virtual void RefreshNC()