ShapedForm
Represents a form with customizable shape and appearance that can be themed.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ShapedForm : Form, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IThemeChangeListener
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlFormShapedForm...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the ShapedForm class.
public ShapedForm()
Properties
Allow form's resize
[Browsable(true)]
public bool AllowResize { get; set; }
Gets or sets the BackColor of the ShapedForm.
public override Color BackColor { get; set; }
Overrides:
Gets or sets the pen alignment for the border.
public PenAlignment BorderAlignment { get; set; }
Gets or sets the form's border color
[Browsable(true)]
public Color BorderColor { get; set; }
protected GraphicsPath BorderPath { get; set; }
Gets or sets the form's border width
[Browsable(true)]
public virtual int BorderWidth { get; set; }
Gets or sets the theme class name for the control.
public string ControlThemeClassName { get; }
Implements:
protected override CreateParams CreateParams { get; }
Overrides:
Enables or disables transparent background on Vista
[Browsable(true)]
public bool EnableCompositionOnVista { get; set; }
Gets or sets the form's font
[Browsable(true)]
public override Font Font { get; set; }
Overrides:
Gets or sets the form's foreground color
[Browsable(true)]
public override Color ForeColor { get; set; }
Overrides:
Gets or sets the FormBorderStyle of the Form.
public FormBorderStyle FormBorderStyle { get; set; }
protected GraphicsPath OuterPath { get; set; }
Gets or sets an instance of the Shape object of a form. The shape of the form is responsible for providing its' border(s) with custom shape.
[Browsable(true)]
public virtual ElementShape Shape { get; set; }
Some predefined shapes are available, like RoundRectShape or EllipseShape. CustomShape offers a way to specify element's shape with a sequence of points and curves using code or the design time ElementShapeEditor UITypeEditor.
protected RadControl ShapedControl { get; }
Gets or sets the windows related setting. Exposes API to round the form's corners on Windows 11. Using the rounded corners API with form's shapes that are not rectangular may lead to unexpected results.
public WindowsSettings WindowsSettings { get; set; }
Methods
protected virtual void ApplicationThemeChanged(object sender, ThemeChangedEventArgs args)
protected virtual void ApplyShape()
Clean up any resources being used.
protected override void Dispose(bool disposing)
true if managed resources should be disposed; otherwise, false.
Overrides:
Handles theme change events to update the form's appearance.
public void OnThemeChanged(ThemeChangedEventArgs e)
The theme changed event arguments.
Implements:
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Overrides:
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Overrides: