ClassThemedFormBehavior
This class represents a base class for all behaviors that modify the non-client area of the form and enable custom painting in it.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class ThemedFormBehavior : FormControlBehavior, IComponent, IDisposable
Inheritance: objectMarshalByRefObjectComponentFormControlBehaviorThemedFormBehavior
Derived Classes:
Implements:
Inherited Members
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
treeHandler
An IComponentTreeHandler instance.
ThemedFormBehavior(IComponentTreeHandler, bool)
Creates an instance of the RadFormBehavior class.
Declaration
public ThemedFormBehavior(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 bool value indiciating whether the behavior applies NC theming to the form.
BottomBorderFrame
This rectangle represents the bottom border frame of a window.
Declaration
public virtual Rectangle BottomBorderFrame { get; }
Property Value
BottomLeftResizeFrame
This rectangle represents the bottomleft sizing corner of a window.
Declaration
public virtual Rectangle BottomLeftResizeFrame { get; }
Property Value
BottomResizeFrame
This rectangle represents the bottom sizing frame of a window.
Declaration
public virtual Rectangle BottomResizeFrame { get; }
Property Value
BottomRightResizeFrame
This rectangle represents the bottomright sizing corner of a window.
Declaration
public virtual Rectangle BottomRightResizeFrame { get; }
Property Value
CaptionFrame
This rectangle represents the caption frame of a window.
Declaration
public virtual Rectangle CaptionFrame { get; }
Property Value
CaptionTextBounds
Gets the rectangle that contains the form's caption text.
Declaration
public abstract Rectangle CaptionTextBounds { get; }
Property Value
ClientFrame
This rectangle represents the client rectangle of a window.
Declaration
public virtual Rectangle ClientFrame { get; }
Property Value
CurrentFormParams
Gets the current form CreateParams settings.
Declaration
public virtual CreateParams CurrentFormParams { get; }
Property Value
CurrentFormState
Gets an integer value that determines the current Form state: Possible values come from the SIZE_RESTORED, SIZE_MAXIMIZED, SIZE_MINIMIZED win32 constants.
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.
IconBounds
Gets the rectangle that contains the form's icon.
Declaration
public abstract Rectangle IconBounds { get; }
Property Value
IsMaximized
Gets a bool value that determines whether the Form's window state is maximized.
IsMdiChildMaximized
Gets a boolean value showing whether a MDI child form is maximized.
Declaration
protected virtual bool IsMdiChildMaximized { get; }
Property Value
IsMenuInForm
Gets a boolean value determining whether there is a Menu in the Form.
IsMinimized
Gets a bool value that determines whether the Form's window state is minimized.
IsNormal
Gets a boolean value that determines whether the Form's window state is normal.
LeftBorderFrame
This rectangle represents the left border frame of a window.
Declaration
public virtual Rectangle LeftBorderFrame { get; }
Property Value
LeftResizeFrame
This rectangle represents the left sizing frame of a window.
Declaration
public virtual Rectangle LeftResizeFrame { get; }
Property Value
MaximizedMDIChild
Gets the maximized MDI child if any.
MenuBounds
Gets the rectangle that contains the menu of the form.
Declaration
public abstract Rectangle MenuBounds { get; }
Property Value
RightBorderFrame
This rectangle represents the right border frame of a window.
Declaration
public virtual Rectangle RightBorderFrame { get; }
Property Value
RightResizeFrame
This rectangle represents the right sizing frame of a window.
Declaration
public virtual Rectangle RightResizeFrame { get; }
Property Value
SystemButtonsBounds
Gets the rectangle that contains the system buttons of the form.
Declaration
public abstract Rectangle SystemButtonsBounds { get; }
Property Value
TopLeftResizeFrame
This rectangle represents the topleft sizing corner of a window.
Declaration
public virtual Rectangle TopLeftResizeFrame { get; }
Property Value
TopResizeFrame
This rectangle represents the top sizing frame of a window.
Declaration
public virtual Rectangle TopResizeFrame { get; }
Property Value
TopRightResizeFrame
This rectangle represents the topright sizing corner of a window.
Declaration
public virtual Rectangle TopRightResizeFrame { get; }
Property Value
Methods
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
GetMappedWindowPoint(Point)
This method transforms screen coordinates into local coordinates.
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
InvalidateElement(RadElement, Rectangle)
Declaration
public override void InvalidateElement(RadElement element, Rectangle bounds)
Parameters
element
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
bounds
OnActiveMDIChildTextChanged()
Declaration
protected virtual void OnActiveMDIChildTextChanged()
OnFormAssociated()
Occurs when a form is associated with the behavior.
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
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
graphics
The NC Graphics.
OnWindowStateChanged(int, int)
Fires when the window state of the form is changed. Uses the SIZE_* values to define the window states.
PaintElement(IGraphics, Rectangle, VisualElement)
Paints an element on a specified graphics.
Declaration
protected virtual void PaintElement(IGraphics graphics, Rectangle clipRectangle, VisualElement element)
Parameters
graphics
The Graphics object to paint on.
clipRectangle
The clipping rectangle.
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()