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

Helper class that parses geometries to strings and strings to geometries. Note that strings are created for serialization purposes and cannot be recognized as Geometry Data by the WPF XAML parser.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public static class GeometryParser

Inheritance: objectGeometryParser

Methods

Main parser routine, which loops over each char in received string, and performs actions according to command/parameter being passed.

C#
public static Geometry GetGeometry(string path)
Parameters:pathstring

String with path data definition.

Returns:

Geometry

PathGeometry object created from string definition.

Main back conversion routine - converts PathGeometry object to its string equivalent.

C#
public static string GetString(Geometry geometry)
Parameters:geometryGeometry

Path Geometry object.

Returns:

string

String equivalent to PathGeometry contents.