Initial Release

Rating: No reviews yet
Downloads: 237
Released: Jun 18, 2008
Updated: Jun 18, 2008 by DevCorner
Dev status: -not yet defined by owner-

Recommended Download

Example PathConverter Usage Sample
example, 544K, uploaded Jun 18, 2008 - 115 downloads

Other Available Downloads

Application PathCOnverter Library - Binary
application, 5K, uploaded Jun 18, 2008 - 42 downloads
Source Code PathCOnverter Library - Source
source code, 7K, uploaded Jun 18, 2008 - 80 downloads

Release Notes

This is first working prototype of StringToPathGeometryConverter.

To use, add reference to PathConverter.DLL in your project.
Sample code:
//String path to draw Rectange
string pathStr = "M 50,50 L 50,100 L 100,100 L 100,50 L 50,50 Z";

//Use StringToPathGeometryConverter
PathConverter.StringToPathGeometryConverter conv = new PathConverter.StringToPathGeometryConverter();
PathGeometry pathGeometry = conv.Convert(pathStr);

//Create Path and use defined geometry with it.
System.Windows.Shapes.Path path = new System.Windows.Shapes.Path();
path.SetValue(System.Windows.Shapes.Path.DataProperty, pathGeometry);
//Define additional properies for created path
path.SetValue(System.Windows.Shapes.Path.NameProperty, "SamplePath");
path.SetValue(Canvas.LeftProperty, 10.0);
path.SetValue(Canvas.TopProperty, 10.0);
SolidColorBrush fillColorBrush = new SolidColorBrush(Colors.Red);
SolidColorBrush strokeColorBrush = new SolidColorBrush(Colors.Black);
path.Fill = fillColorBrush;
path.Stroke = strokeColorBrush;
path.Width = 100;
path.Height = 100;
//Given "Root" as Canvas object in your UserControl, add created Path to it

See another eample in attached sample.

Reviews for this release

No reviews yet for this release.