I want the PathGeometry that consist of LineSegment.
So, I use this first code but it's error.
PathGeometry temp = (PathGeometry)Geometry.Parse(
"<PathGeometry.Figures>" +
"<PathFigure StartPoint=\"193.5,283.5\" IsClosed=\"True\">" +
"<PathFigure.Segments>" +
"<LineSegment Point=\"418.5,283.5\" />" +
"<LineSegment Point=\"418.5,508.5\" />" +
"<LineSegment Point=\"193.5,508.5\" />" +
"<LineSegment Point=\"193.5,283.5\" />" +
"</PathFigure.Segments>" +
"</PathFigure>" +
"</PathGeometry.Figures>");
If I use this second code, it's not error but it doesn't consist of LineSegment. The result will be PolyLineSegment but I want LineSegment.
PathGeometry temp = (PathGeometry)Geometry.Parse(
"M29,329L30,331L31,334L33,336L34,338L36,341L38,343L39,345L41,348L44,352L46,353L47,355L48,356L49,357L49,357L50,358L50,358L51,357L50,356L51,354L51,350L53,342L54,334L58,320L60,315L61,311L63,308L63,306L64,304L65,303L65,302L66,301L66,301L66,301L66,301L66,301L66,301L66,301");
How do I convert XAML PathGeometry to WPF PathGeometry?
Thanks