我正在尝试使用(PathGeometry)复制我使用(Path)绘制的正方形。我想根据它的起始位置移动这个方块,让其余的相对于它进行渲染。但是我无法弄清楚如何复制" m"这种方式的(Path.Data)属性,它出于某种原因我不能自动使用" M"。任何可以教我如何解决这个问题的人?谷歌并没有真正区分" m"和" M"。
原始路径(Square):
<Path Stroke="Red" Data="m 15 250 70 0 0 90 -70 0 z"></Path>
这是我试图开始工作的替代方案(显然通过将起点绑定到我控制的值来更容易移动整个方块)。
<Path Stroke="Black" StrokeThickness="1">
<Path.Data>
<PathGeometry>
<PathGeometry.Figures>
<PathFigureCollection>
<PathFigure IsClosed="True" StartPoint="15,250">
<PathFigure.Segments>
<PathSegmentCollection>
<LineSegment Point="70,0" />
<LineSegment Point="0,90" />
<LineSegment Point="-70,0" />
</PathSegmentCollection>
</PathFigure.Segments>
</PathFigure>
</PathFigureCollection>
</PathGeometry.Figures>
</PathGeometry>
</Path.Data>
</Path>