path - WPF Change a rectangles points at runtime -


I have a WPF app in which I need to manipulate the runtime in sequence.

By doing this the path is going on with 4 line segments:

  canvas.Left = "324" canvas.pop = "247" & gt; & Lt; Path.Data & gt; & Lt; PathGeometry & gt; & Lt; Pathfigure isClosed = "true" & gt; & Lt; Line segment = "0.5,0.5" /> & Lt; Line segment point = "355.5,0.5" /> & Lt; Line segment point = "355.5229.5" /> & Lt; Line segment = "0.5,22 9.5" /> & lt; / PathFigure & gt; & Lt; / PathGeometry & gt; & Lt; /Path.Data> & Lt; / Path & gt;  

Now, in my C # code I can do this:

  Pathfigure selection statistics = (path as pathGemometry.Data). Organ; Console.light line ("Segment number:" + statistics [0] .egds.Count); Line segmentation top lift = figures [0]. [0] as a lineage; Line segmentation toprights = statistics [0]. [1] In line form of Segment; Right below the line segment = figures [0]. [2] as a lineage; Line segmented lift = figures [0]. [3] as the line segment; TopLeft.Point = New Point (topLeft.Point.X - 5, topLeft.Point.Y - 5); TopRight.Point = new point (topRight.Point.X + 45, topRight.Point.Y - 35); Right below.point = new point (right.point.x, right below.point.Y + 35); facing down. Point = new point (bottom lift.point.x +5, bottom lift.point.Y-15);  

But the problem is that when I change the top left line segment, "seems" to add a point to the list of sections, that is, two final digits (bottom left and top left) Do not join now anymore ...

I know that here a little something is missing, but please, any help would be greatly appreciated

thanks, Mark

OK, I know that, let me set the startpoint on the pathfinder And that point needs to be replaced with line segments (from which I removed the first, on which I added startpoint).

Thank you.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -