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.
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
Creates an instance of the ThemedFormBehavior class.
public ThemedFormBehavior()
Creates an instance of the RadFormBehavior class.
public ThemedFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
An IComponentTreeHandler instance.
shouldCreateChildrenboolA flag that determines whether the CreateChildItems call is rerouted to the behavior.
Creates an instance of the RadFormBehavior class.
public ThemedFormBehavior(IComponentTreeHandler treeHandler)
An IComponentTreeHandler instance.
Properties
Gets or sets a bool value indiciating whether the behavior applies NC theming to the form.
public abstract bool AllowTheming { get; set; }
This rectangle represents the bottom border frame of a window.
public virtual Rectangle BottomBorderFrame { get; }
This rectangle represents the bottomleft sizing corner of a window.
public virtual Rectangle BottomLeftResizeFrame { get; }
This rectangle represents the bottom sizing frame of a window.
public virtual Rectangle BottomResizeFrame { get; }
This rectangle represents the bottomright sizing corner of a window.
public virtual Rectangle BottomRightResizeFrame { get; }
This rectangle represents the caption frame of a window.
public virtual Rectangle CaptionFrame { get; }
Gets the rectangle that contains the form's caption text.
public abstract Rectangle CaptionTextBounds { get; }
This rectangle represents the client rectangle of a window.
public virtual Rectangle ClientFrame { get; }
Gets the current form CreateParams settings.
public virtual CreateParams CurrentFormParams { get; }
Gets an integer value that determines the current Form state: Possible values come from the SIZE_RESTORED, SIZE_MAXIMIZED, SIZE_MINIMIZED win32 constants.
protected int CurrentFormState { get; }
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.
public RadFormControlBase Form { get; set; }
Gets the MdiClient control of the Form. Returns null if the Form is not MdiContainer.
protected MdiClient FormMdiClient { get; }
Gets the rectangle that contains the form's icon.
public abstract Rectangle IconBounds { get; }
Gets a bool value that determines whether the Form's window state is maximized.
protected virtual bool IsMaximized { get; }
Gets a boolean value showing whether a MDI child form is maximized.
protected virtual bool IsMdiChildMaximized { get; }
Gets a boolean value determining whether there is a Menu in the Form.
protected bool IsMenuInForm { get; }
Gets a bool value that determines whether the Form's window state is minimized.
protected virtual bool IsMinimized { get; }
Gets a boolean value that determines whether the Form's window state is normal.
protected virtual bool IsNormal { get; }
This rectangle represents the left border frame of a window.
public virtual Rectangle LeftBorderFrame { get; }
This rectangle represents the left sizing frame of a window.
public virtual Rectangle LeftResizeFrame { get; }
protected RadMenu MainMenuInForm { get; }
Gets the maximized MDI child if any.
protected Form MaximizedMDIChild { get; }
Gets the rectangle that contains the menu of the form.
public abstract Rectangle MenuBounds { get; }
This rectangle represents the right border frame of a window.
public virtual Rectangle RightBorderFrame { get; }
This rectangle represents the right sizing frame of a window.
public virtual Rectangle RightResizeFrame { get; }
Gets the rectangle that contains the system buttons of the form.
public abstract Rectangle SystemButtonsBounds { get; }
This rectangle represents the topleft sizing corner of a window.
public virtual Rectangle TopLeftResizeFrame { get; }
This rectangle represents the top sizing frame of a window.
public virtual Rectangle TopResizeFrame { get; }
This rectangle represents the topright sizing corner of a window.
public virtual Rectangle TopRightResizeFrame { get; }
Methods
public override CreateParams CreateParams(CreateParams parameters)
Overrides:
This method transforms screen coordinates into local coordinates.
This method returns the maximum available height according to the current position of the form in multi-monitor setup.
public override void InvalidateElement(RadElement element, Rectangle bounds)
Overrides:
Invalidates the specified bounds in the non-client area of the form this behavior is associated with.
protected virtual void OnActiveMDIChildTextChanged()
Occurs when a form is associated with the behavior.
protected override void OnFormAssociated()
Overrides:
This event is fired when the WM_GETMINMAXINFO message is sent to the form.
protected virtual void OnGetMinMaxInfo(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.
This event is fired when the WM_NCPAINT message is sent to the form.
Fires when the window state of the form is changed. Uses the SIZE_* values to define the window states.
Paints an element on a specified graphics.
protected virtual void PaintElement(IGraphics graphics, Rectangle clipRectangle, VisualElement element)
The Graphics object to paint on.
clipRectangleRectangleThe clipping rectangle.
elementVisualElementThe element to paint.
Immediately refreshes the whole non-client area of the form which this behavior is associated with.
protected virtual void RefreshNC()