I was totally tired of adding a Rectangle
to a path figure. Below was my tried code, but it does not results correctly as a Rectangle
:
PathGeometry geom = new PathGeometry();
Geometry g = new RectangleGeometry(myrectangel);
geom.AddGeometry(g);
PathFigureCollection collection = geom.Figures;
pathfigure = collection[0];
Is there any other way?
You can combined geometries using a GeometryGroup. A
GeometryGroup
creates a composite geometry from one or moreGeometry
objects.