New to Telerik UI for WPF? Start a free 30-day trial

Shape factory.

Definition

Namespace:Telerik.Windows.Controls.Diagrams

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

C#
public static class ShapeFactory

Inheritance: objectShapeFactory

Properties

Gets the arrow geometries.

C#
public static Dictionary<ArrowShapeType, Geometry> ArrowGeometries { get; }

See also the example in the CommonGeometries.

Gets the common geometries.

C#
public static Dictionary<CommonShapeType, Geometry> CommonGeometries { get; }
Example:
C#
&lt;ListBox x:Name="ShapeList" &gt;
&lt;ListBox.ItemTemplate&gt;
&lt;DataTemplate&gt;
&lt;Path Data="{Binding Path=Value}" Tag="{Binding Path=Key}"  Stroke="Orange" StrokeThickness="1" Margin="2" /&gt;
&lt;/DataTemplate&gt;
&lt;/ListBox.ItemTemplate&gt;
&lt;ListBox.ItemsPanel&gt;
&lt;ItemsPanelTemplate&gt;
&lt;WrapPanel Width="300" /&gt;
&lt;/ItemsPanelTemplate&gt;
&lt;/ListBox.ItemsPanel&gt;
&lt;/ListBox&gt;

Gets the flowchart geometries.

C#
public static Dictionary<FlowChartShapeType, Geometry> FlowchartGeometries { get; }

See also the example in the CommonGeometries.

Methods

C#
public static RadDiagramShape CreateCircle(double radiusX, double radiusY, Point center)
Parameters:radiusXdoubleradiusYdoublecenterPointReturns:

RadDiagramShape

C#
public static RadDiagramShape CreateRectangle(Rect rect)
Parameters:rectRectReturns:

RadDiagramShape

Gets a geometry of a specified arrow shape type.

C#
public static Geometry GetShapeGeometry(ArrowShapeType shapeType)
Parameters:shapeTypeArrowShapeTypeReturns:

Geometry

Gets a geometry of a specified common shape type.

C#
public static Geometry GetShapeGeometry(CommonShapeType shapeType)
Parameters:shapeTypeCommonShapeTypeReturns:

Geometry

Gets a geometry of a specified flow chart shape type.

C#
public static Geometry GetShapeGeometry(FlowChartShapeType shapeType)
Parameters:shapeTypeFlowChartShapeTypeReturns:

Geometry