3
我完全厭倦將Rectangle
添加到路徑圖中。下面是我試過的代碼,但它正確不結果爲Rectangle
:如何將矩形添加到PathFigure WPF
PathGeometry geom = new PathGeometry();
Geometry g = new RectangleGeometry(myrectangel);
geom.AddGeometry(g);
PathFigureCollection collection = geom.Figures;
pathfigure = collection[0];
有沒有其他辦法?
感謝Nitesh ......但我需要將它添加到的PathFigure,最後使用它,因爲我有很多rectagles像上面.... /// –
你可以用'GeometryGroup'。 – Nitesh
多數民衆贊成在酷Nitesh,。一個想法...謝謝 –