New to Telerik UI for .NET MAUI? Start a free 30-day trial

RadPath

Class

Represents a simple path defined by its Geometry.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class RadPath : RadLayout

Inheritance: objectRadLayoutRadPath

Inherited Members RadLayout.CreateLayoutManager()

Constructors

Initializes a new instance of the path.

C#
public RadPath()

Fields

FillProperty

BindableProperty

Identifies the Fill property.

C#
public static readonly BindableProperty FillProperty

GeometryProperty

BindableProperty

Identifies the Geometry property.

C#
public static readonly BindableProperty GeometryProperty

StrokeProperty

BindableProperty

Identifies the Stroke property.

C#
public static readonly BindableProperty StrokeProperty

StrokeThicknessProperty

BindableProperty

Identifies the StrokeThickness property.

C#
public static readonly BindableProperty StrokeThicknessProperty

Properties

Gets or sets the fill of the path.

C#
[TypeConverter(typeof(RadBrushTypeConverter))]
public RadBrush Fill { get; set; }

Gets or sets the path geometry.

C#
[TypeConverter(typeof(GeometryTypeConverter))]
public RadPathGeometry Geometry { get; set; }
Example:
C#
// Create a simple square path geometry
var path = new RadPath
{
Geometry = new RadPathGeometry
{
Figures = new List<RadPathFigure>
{
new RadPathFigure
{
StartPoint = new Point(0, 0),
Segments = new List<RadPathSegment>
{
new RadLineSegment { Point = new Point(1, 0) },
new RadLineSegment { Point = new Point(1, 1) },
new RadLineSegment { Point = new Point(0, 1) },
new RadLineSegment { Point = new Point(0, 0) }
}
}
}
},
Fill = new RadSolidColorBrush(Colors.Blue),
Stroke = new RadSolidColorBrush(Colors.Black),
StrokeThickness = 2
};

// Create a star
var path = new RadPath
{
Geometry = RadGeometry.Star,
Fill = new RadSolidColorBrush(Colors.Blue),
Stroke = new RadSolidColorBrush(Colors.Black),
StrokeThickness = 2
};

// Create a circle
var path = new RadPath
{
Geometry = RadGeometry.Circle,
Fill = new RadSolidColorBrush(Colors.Red),
Stroke = new RadSolidColorBrush(Colors.Black),
StrokeThickness = 2
};

// Create a heart
var path = new RadPath
{
Geometry = RadGeometry.Heart,
Fill = new RadSolidColorBrush(Colors.Pink),
Stroke = new RadSolidColorBrush(Colors.Red),
StrokeThickness = 2
};

// Create a diamond
var path = new RadPath
{
Geometry = RadGeometry.Diamond,
Fill = new RadSolidColorBrush(Colors.Yellow),
Stroke = new RadSolidColorBrush(Colors.Orange),
StrokeThickness = 2
};

Gets or sets the stroke of the path.

C#
[TypeConverter(typeof(RadBrushTypeConverter))]
public RadBrush Stroke { get; set; }

Gets or sets the stroke thickness.

C#
public double StrokeThickness { get; set; }