skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ShapedForm

Represents a form with customizable shape and appearance that can be themed.

Inheritance
System.Object
ShapedForm
MiniToolBarBase
RadCalloutForm
RadDiagramSettingsPane
RadFlyoutForm
RadOverlayForm
RadSplashScreenForm
IntelliPromptBase
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

public class ShapedForm : Form, IThemeChangeListener

Constructors

ShapedForm()

Initializes a new instance of the ShapedForm class.

Declaration
public ShapedForm()

Properties

AllowResize

Allow form's resize

Declaration
public bool AllowResize { get; set; }
Property Value
System.Boolean

BackColor

Gets or sets the BackColor of the ShapedForm.

Declaration
public override Color BackColor { get; set; }
Property Value
System.Drawing.Color

BorderAlignment

Gets or sets the pen alignment for the border.

Declaration
public PenAlignment BorderAlignment { get; set; }
Property Value
System.Drawing.Drawing2D.PenAlignment

BorderColor

Gets or sets the form's border color

Declaration
public Color BorderColor { get; set; }
Property Value
System.Drawing.Color

BorderPath

Declaration
protected GraphicsPath BorderPath { get; set; }
Property Value
System.Drawing.Drawing2D.GraphicsPath

BorderWidth

Gets or sets the form's border width

Declaration
public virtual int BorderWidth { get; set; }
Property Value
System.Int32

ControlThemeClassName

Gets or sets the theme class name for the control.

Declaration
public string ControlThemeClassName { get; }
Property Value
System.String

Implements
IThemeChangeListener.ControlThemeClassName

CreateParams

Declaration
protected override CreateParams CreateParams { get; }
Property Value
System.Windows.Forms.CreateParams

EnableCompositionOnVista

Enables or disables transparent background on Vista

Declaration
public bool EnableCompositionOnVista { get; set; }
Property Value
System.Boolean

Font

Gets or sets the form's font

Declaration
public override Font Font { get; set; }
Property Value
System.Drawing.Font

ForeColor

Gets or sets the form's foreground color

Declaration
public override Color ForeColor { get; set; }
Property Value
System.Drawing.Color

FormBorderStyle

Gets or sets the FormBorderStyle of the Form.

Declaration
public FormBorderStyle FormBorderStyle { get; set; }
Property Value
System.Windows.Forms.FormBorderStyle

OuterPath

Declaration
protected GraphicsPath OuterPath { get; set; }
Property Value
System.Drawing.Drawing2D.GraphicsPath

Shape

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.

Declaration
public virtual ElementShape Shape { get; set; }
Property Value
ElementShape

Remarks

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 System.Drawing.Design.UITypeEditor.

ShapedControl

Declaration
protected RadControl ShapedControl { get; }
Property Value
RadControl

ThemeName

Gets or sets theme name.

Declaration
public string ThemeName { get; set; }
Property Value
System.String

WindowsSettings

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.

Declaration
public WindowsSettings WindowsSettings { get; set; }
Property Value
WindowsSettings

Methods

ApplicationThemeChanged(Object, ThemeChangedEventArgs)

Declaration
protected virtual void ApplicationThemeChanged(object sender, ThemeChangedEventArgs args)
Parameters
System.Object sender

ThemeChangedEventArgs args

ApplyShape()

Declaration
protected virtual void ApplyShape()

ApplyTheme(String)

Declaration
protected virtual void ApplyTheme(string themeName)
Parameters
System.String themeName

CreateBorderPath()

Declaration
protected virtual GraphicsPath CreateBorderPath()
Returns
System.Drawing.Drawing2D.GraphicsPath

Dispose(Boolean)

Clean up any resources being used.

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

true if managed resources should be disposed; otherwise, false.

GetHitTest(Point)

Declaration
protected virtual int GetHitTest(Point point)
Parameters
System.Drawing.Point point

Returns
System.Int32

IsRectangularShape(ref Int32)

Declaration
protected virtual bool IsRectangularShape(ref int radius)
Parameters
System.Int32 radius

Returns
System.Boolean

LOWORD(Int32)

Declaration
public static short LOWORD(int number)
Parameters
System.Int32 number

Returns
System.Int16

OnLoad(EventArgs)

Declaration
protected override void OnLoad(EventArgs e)
Parameters
System.EventArgs e

OnMove(EventArgs)

Declaration
protected override void OnMove(EventArgs e)
Parameters
System.EventArgs e

OnPaintBackground(PaintEventArgs)

Declaration
protected override void OnPaintBackground(PaintEventArgs e)
Parameters
System.Windows.Forms.PaintEventArgs e

OnResizeBegin(EventArgs)

Declaration
protected override void OnResizeBegin(EventArgs e)
Parameters
System.EventArgs e

OnResizeEnd(EventArgs)

Declaration
protected override void OnResizeEnd(EventArgs e)
Parameters
System.EventArgs e

OnShown(EventArgs)

Declaration
protected override void OnShown(EventArgs e)
Parameters
System.EventArgs e

OnSizeChanged(EventArgs)

Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
System.EventArgs e

OnThemeChanged(ThemeChangedEventArgs)

Handles theme change events to update the form's appearance.

Declaration
public void OnThemeChanged(ThemeChangedEventArgs e)
Parameters
ThemeChangedEventArgs e

The theme changed event arguments.

Implements
IThemeChangeListener.OnThemeChanged(ThemeChangedEventArgs)

PaintBorder(Graphics)

Declaration
protected virtual void PaintBorder(Graphics g)
Parameters
System.Drawing.Graphics g

PaintFrame(Graphics)

Declaration
protected virtual void PaintFrame(Graphics g)
Parameters
System.Drawing.Graphics g

ScaleControl(SizeF, BoundsSpecified)

Declaration
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters
System.Drawing.SizeF factor

System.Windows.Forms.BoundsSpecified specified

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
System.Int32 x

System.Int32 y

System.Int32 width

System.Int32 height

System.Windows.Forms.BoundsSpecified specified

SetClientSizeCore(Int32, Int32)

Declaration
protected override void SetClientSizeCore(int x, int y)
Parameters
System.Int32 x

System.Int32 y

WndProc(ref Message)

Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message m

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.