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
IComponentTreeHandler
treeHandler
An IComponentTreeHandler instance. |
ThemedFormBehavior(IComponentTreeHandler, Boolean)
Creates an instance of the RadFormBehavior class.
Declaration
public ThemedFormBehavior(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 bool value indiciating whether the behavior applies NC theming to the form.
Declaration
public abstract bool AllowTheming { get; set; }
Property Value
System.Boolean
|
BottomBorderFrame
This rectangle represents the bottom border frame of a window.
Declaration
public virtual Rectangle BottomBorderFrame { get; }
Property Value
System.Drawing.Rectangle
|
BottomLeftResizeFrame
This rectangle represents the bottomleft sizing corner of a window.
Declaration
public virtual Rectangle BottomLeftResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
BottomResizeFrame
This rectangle represents the bottom sizing frame of a window.
Declaration
public virtual Rectangle BottomResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
BottomRightResizeFrame
This rectangle represents the bottomright sizing corner of a window.
Declaration
public virtual Rectangle BottomRightResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
CaptionFrame
This rectangle represents the caption frame of a window.
Declaration
public virtual Rectangle CaptionFrame { get; }
Property Value
System.Drawing.Rectangle
|
CaptionTextBounds
Gets the rectangle that contains the form's caption text.
Declaration
public abstract Rectangle CaptionTextBounds { get; }
Property Value
System.Drawing.Rectangle
|
ClientFrame
This rectangle represents the client rectangle of a window.
Declaration
public virtual Rectangle ClientFrame { get; }
Property Value
System.Drawing.Rectangle
|
CurrentFormParams
Gets the current form CreateParams settings.
Declaration
public virtual CreateParams CurrentFormParams { get; }
Property Value
System.Windows.Forms.CreateParams
|
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.Int32
|
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
RadFormControlBase
|
FormMdiClient
Gets the MdiClient control of the Form. Returns null if the Form is not MdiContainer.
Declaration
protected MdiClient FormMdiClient { get; }
Property Value
System.Windows.Forms.MdiClient
|
IconBounds
Gets the rectangle that contains the form's icon.
Declaration
public abstract Rectangle IconBounds { get; }
Property Value
System.Drawing.Rectangle
|
IsMaximized
Gets a bool value that determines whether the Form's window state is maximized.
Declaration
protected virtual bool IsMaximized { get; }
Property Value
System.Boolean
|
IsMdiChildMaximized
Gets a boolean value showing whether a MDI child form is maximized.
Declaration
protected virtual bool IsMdiChildMaximized { get; }
Property Value
System.Boolean
|
IsMenuInForm
Gets a boolean value determining whether there is a Menu in the Form.
Declaration
protected bool IsMenuInForm { get; }
Property Value
System.Boolean
|
IsMinimized
Gets a bool value that determines whether the Form's window state is minimized.
Declaration
protected virtual bool IsMinimized { get; }
Property Value
System.Boolean
|
IsNormal
Gets a boolean value that determines whether the Form's window state is normal.
Declaration
protected virtual bool IsNormal { get; }
Property Value
System.Boolean
|
LeftBorderFrame
This rectangle represents the left border frame of a window.
Declaration
public virtual Rectangle LeftBorderFrame { get; }
Property Value
System.Drawing.Rectangle
|
LeftResizeFrame
This rectangle represents the left sizing frame of a window.
Declaration
public virtual Rectangle LeftResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
MainMenuInForm
MaximizedMDIChild
Gets the maximized MDI child if any.
Declaration
protected Form MaximizedMDIChild { get; }
Property Value
System.Windows.Forms.Form
|
MenuBounds
Gets the rectangle that contains the menu of the form.
Declaration
public abstract Rectangle MenuBounds { get; }
Property Value
System.Drawing.Rectangle
|
RightBorderFrame
This rectangle represents the right border frame of a window.
Declaration
public virtual Rectangle RightBorderFrame { get; }
Property Value
System.Drawing.Rectangle
|
RightResizeFrame
This rectangle represents the right sizing frame of a window.
Declaration
public virtual Rectangle RightResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
SystemButtonsBounds
Gets the rectangle that contains the system buttons of the form.
Declaration
public abstract Rectangle SystemButtonsBounds { get; }
Property Value
System.Drawing.Rectangle
|
TopLeftResizeFrame
This rectangle represents the topleft sizing corner of a window.
Declaration
public virtual Rectangle TopLeftResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
TopResizeFrame
This rectangle represents the top sizing frame of a window.
Declaration
public virtual Rectangle TopResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
TopRightResizeFrame
This rectangle represents the topright sizing corner of a window.
Declaration
public virtual Rectangle TopRightResizeFrame { get; }
Property Value
System.Drawing.Rectangle
|
Methods
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
GetMappedWindowPoint(Point)
This method transforms screen coordinates into local coordinates.
Declaration
protected virtual Point GetMappedWindowPoint(Point screenPoint)
Parameters
System.Drawing.Point
screenPoint
The screen point to transform. |
Returns
System.Drawing.Point
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.Int32
|
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
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.Drawing.Rectangle
bounds
|
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
MinMaxInfo
minMaxInfo
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.Drawing.Graphics
graphics
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.Int32
currentFormState
The old window state of the form. |
System.Int32
newFormState
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.Drawing.Rectangle
clipRectangle
The clipping rectangle. |
VisualElement
element
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()