New to Telerik UI for WinFormsStart a free 30-day trial

Represents the base class for element shapes that define the visual geometry of UI elements.

Definition

Constructors

C#
public ElementShape()
C#
public ElementShape(IContainer container)
Parameters:containerIContainer

Properties

Gets or sets a value indicating whether the shape should be rendered for right-to-left layouts.

C#
public bool IsRightToLeft { get; set; }
Property Value:

true if the shape supports right-to-left rendering; otherwise, false.

Methods

C#
protected virtual GraphicsPath CreateContour(Rectangle bounds)
Parameters:boundsRectangleReturns:

GraphicsPath

Creates a GraphicsPath using the specified rectangle as bounds. This method must be implemented by derived classes.

C#
public abstract GraphicsPath CreatePath(Rectangle bounds)
Parameters:boundsRectangle

The rectangle defining the bounds for the shape.

Returns:

GraphicsPath

A GraphicsPath representing the shape within the specified bounds.

Creates a GraphicsPath using the specified rectangle as bounds with floating-point precision.

C#
public virtual GraphicsPath CreatePath(RectangleF bounds)
Parameters:boundsRectangleF

The rectangle defining the bounds for the shape.

Returns:

GraphicsPath

A GraphicsPath representing the shape within the specified bounds.

C#
public virtual Region CreateRegion(Rectangle bounds)
Parameters:boundsRectangleReturns:

Region

Deserializes properties. Required for the deserialization mechanism of telerik framework.

C#
public virtual void DeserializeProperties(string propertiesString)
Parameters:propertiesStringstring
C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

Overrides: Component.Dispose(bool)

C#
protected virtual Rectangle GetBounds(RadElement element)
Parameters:elementRadElementReturns:

Rectangle

Retrieves the contour path for the specified element.

C#
public GraphicsPath GetElementContour(RadElement element)
Parameters:elementRadElement

The element for which to create the contour.

Returns:

GraphicsPath

A GraphicsPath representing the element's contour.

Remarks:

The contour typically represents the outline or border of the element's shape.

C#
public GraphicsPath GetElementContour(Rectangle bounds)
Parameters:boundsRectangleReturns:

GraphicsPath

Retrieves the shape path for the specified element.

C#
public GraphicsPath GetElementShape(RadElement element)
Parameters:elementRadElement

The element for which to create the shape.

Returns:

GraphicsPath

A GraphicsPath representing the element's shape.

Remarks:

The GraphicsPath represents a series of connected lines and curves that define the element's geometry.

Mirrors the GraphicsPath. Used in RightToLeft mode.

C#
protected virtual void MirrorPath(GraphicsPath graphicsPath, RectangleF bounds)
Parameters:graphicsPathGraphicsPathboundsRectangleF

Serializes properties. Required for serialization mechanism of telerik framework.

C#
public virtual string SerializeProperties()
Returns:

string

C#
protected virtual bool ShouldMirrorPath()
Returns:

bool