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

Represents a custom shape based on a graphics path that can be scaled and transformed.

Definition

Namespace:Telerik.WinControls.Shapes

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class PathElementShape : CustomShape, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentElementShapeCustomShapePathElementShape...

Derived Classes: CalloutElementShape

Implements: IComponentIDisposable

Inherited Members CustomShape.Clone()CustomShape.CopyFrom(CustomShape)CustomShape.GetBoundingRectangle()CustomShape.DoFixDimension(bool)CustomShape.DoFixDimension()CustomShape.AddLine(PointF, PointF)CustomShape.AddBezier(PointF, PointF, PointF, PointF)CustomShape.AppendLine(PointF)CustomShape.AppendBezier(PointF, PointF, PointF)CustomShape.CloseFigureUsingLine()CustomShape.CloseFigureUsingBezier(PointF, PointF)CustomShape.CreateClosedShape(ShapePoint[])CustomShape.CreateClosedShape(PointF[])CustomShape.CreateClosedShape(List<PointF>)CustomShape.CreateRectangleShape(PointF, PointF)CustomShape.CreateRectangleShape(float, float, float, float)CustomShape.CreateRectangleShape(PointF, SizeF)CustomShape.CreateRectangleShape(Rectangle)CustomShape.DimensionCustomShape.ShapeCustomShape.AsStringElementShape.GetElementShape(RadElement)ElementShape.GetElementContour(RadElement)ElementShape.GetElementContour(Rectangle)ElementShape.CreateRegion(Rectangle)ElementShape.GetBounds(RadElement)ElementShape.CreatePath(RectangleF)ElementShape.CreateContour(Rectangle)ElementShape.MirrorPath(GraphicsPath, RectangleF)ElementShape.ShouldMirrorPath()ElementShape.Dispose(bool)ElementShape.IsRightToLeftComponent.Dispose()Component.GetService(Type)Component.ToString()Component.CanRaiseEventsComponent.EventsComponent.SiteComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)...

Constructors

Initializes a new instance of the PathElementShape class.

C#
public PathElementShape()

Initializes a new instance of the PathElementShape class with the specified path and owner.

C#
public PathElementShape(GraphicsPath path, VisualElement owner)
Parameters:pathGraphicsPath

The graphics path that defines the shape.

ownerVisualElement

The visual element that owns this shape.

Properties

Gets or sets the bounding rectangle of the shape.

C#
public RectangleF Bounds { get; set; }
Property Value:

The bounds of the shape.

Gets or sets the visual element that owns this shape.

C#
public VisualElement Owner { get; set; }
Property Value:

The owner visual element.

Gets or sets the graphics path that defines the shape geometry.

C#
public GraphicsPath Path { get; set; }
Property Value:

The graphics path of the shape.

Gets the scaled graphics path after transformation to fit the specified bounds.

C#
public GraphicsPath ScaledPath { get; }
Property Value:

The scaled and transformed path.

Methods

Creates a scaled and transformed graphics path based on the original path and specified bounds.

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

The target bounds for the shape.

Returns:

GraphicsPath

A GraphicsPath scaled and transformed to fit the specified bounds.

Overrides: CustomShape.CreatePath(Rectangle)

Deserializes path properties from a string representation to reconstruct the graphics path.

C#
public override void DeserializeProperties(string propertiesString)
Parameters:propertiesStringstring

The string containing serialized path data and types.

Overrides: CustomShape.DeserializeProperties(string)

Serializes the path properties to a string representation for persistence.

C#
public override string SerializeProperties()
Returns:

string

A string containing the serialized path data and types.

Overrides: CustomShape.SerializeProperties()