How to set data to a Path
How can I set Data to a path
I'm looking at this post
viewtopic.php?t=515#p2637
But for me 'Path' does not contain a definition for 'SetData'.
What am I missing ?
I'm looking at this post
viewtopic.php?t=515#p2637
But for me 'Path' does not contain a definition for 'SetData'.
What am I missing ?
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: How to set data to a Path
Hi, our API has evolved a lot since that post, making it more compatible with WPF. Now you can set the Data geometry as a property:
Code: Select all
Path arc = new Path;
StreamGeometry geometry = new StreamGeometry();
using (StreamGeometryContext context = geom.Open())
{
context.BeginFigure(startPoint, false, false);
context.ArcTo(enPoint, arcSize, rotationAngle, isLargeArc, SweepDirection.Clockwise, false, false);
}
arc.Data = geometry;
Who is online
Users browsing this forum: TommyDawkins and 21 guests