Class
ElementShape

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

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(ElementShapeConverter))]
public abstract class ElementShape : Component, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentElementShape

Derived Classes: ChamferedRectShapeCircleShapeCustomShapeEllipseShapeRoundRectShapeDonutShapeMediaShapeQAShapeDiamondShapeGanttViewSummaryLeftElement.LeftShapeGanttViewSummaryRightElement.RightShapeGaugeVisualElement.GaugeShapeRadialGaugeBackground.GaugeBackgroundShapeHeartShapeOfficeShapeStarShapeTabEdgeShapeTabIEShapeTabItemShapeTabVsShape

Implements: IComponentIDisposable

Inherited Members Component.Dispose()Component.GetService(Type)Component.ToString()Component.CanRaiseEventsComponent.EventsComponent.SiteComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

ElementShape()

Declaration

cs-api-definition
public ElementShape()

ElementShape(IContainer)

Declaration

cs-api-definition
public ElementShape(IContainer container)

Parameters

container

IContainer

Properties

IsRightToLeft

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

Declaration

cs-api-definition
public bool IsRightToLeft { get; set; }

Property Value

bool

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

Methods

CreateContour(Rectangle)

Declaration

cs-api-definition
protected virtual GraphicsPath CreateContour(Rectangle bounds)

Parameters

bounds

Rectangle

Returns

GraphicsPath

CreatePath(Rectangle)

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

Declaration

cs-api-definition
public abstract GraphicsPath CreatePath(Rectangle bounds)

Parameters

bounds

Rectangle

The rectangle defining the bounds for the shape.

Returns

GraphicsPath

A GraphicsPath representing the shape within the specified bounds.

CreatePath(RectangleF)

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

Declaration

cs-api-definition
public virtual GraphicsPath CreatePath(RectangleF bounds)

Parameters

bounds

RectangleF

The rectangle defining the bounds for the shape.

Returns

GraphicsPath

A GraphicsPath representing the shape within the specified bounds.

CreateRegion(Rectangle)

Declaration

cs-api-definition
public virtual Region CreateRegion(Rectangle bounds)

Parameters

bounds

Rectangle

Returns

Region

DeserializeProperties(string)

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

Declaration

cs-api-definition
public virtual void DeserializeProperties(string propertiesString)

Parameters

propertiesString

string

Dispose(bool)

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

Overrides Component.Dispose(bool)

GetBounds(RadElement)

Declaration

cs-api-definition
protected virtual Rectangle GetBounds(RadElement element)

Parameters

element

RadElement

Returns

Rectangle

GetElementContour(RadElement)

Retrieves the contour path for the specified element.

Declaration

cs-api-definition
public GraphicsPath GetElementContour(RadElement element)

Parameters

element

RadElement

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.

GetElementContour(Rectangle)

Declaration

cs-api-definition
public GraphicsPath GetElementContour(Rectangle bounds)

Parameters

bounds

Rectangle

Returns

GraphicsPath

GetElementShape(RadElement)

Retrieves the shape path for the specified element.

Declaration

cs-api-definition
public GraphicsPath GetElementShape(RadElement element)

Parameters

element

RadElement

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.

MirrorPath(GraphicsPath, RectangleF)

Mirrors the GraphicsPath. Used in RightToLeft mode.

Declaration

cs-api-definition
protected virtual void MirrorPath(GraphicsPath graphicsPath, RectangleF bounds)

Parameters

graphicsPath

GraphicsPath

bounds

RectangleF

SerializeProperties()

Serializes properties. Required for serialization mechanism of telerik framework.

Declaration

cs-api-definition
public virtual string SerializeProperties()

Returns

string

ShouldMirrorPath()

Declaration

cs-api-definition
protected virtual bool ShouldMirrorPath()

Returns

bool