I have different geometries which are created based on different elements. But what they all have in common are that they are closed figures. Which can be seen on an example in this link. So I want to use these elements to create one element, this I have succeeded in by using GeometryGroup. Using the before mentioned link, it is possible to use these geometries to create one path. The problem for me is the individual geometries in the geometry group are shapes, which I would like to paint in individual colors. but I do not know how to color the individual elements, since the geometries do not posses this property, I have looked at different links but not found anything that seems to work.
Different fill behavior inside a Path GeometryGroup
Filling Color in a hexagon in WPF
http://msdn.microsoft.com/en-us/library/aa970904%28v=vs.110%29.aspx
Does anyone have an idea how to create complex shapes with different colors in c#. Because I have succeeded in the shapes and I then have to export them as a path to use them. So another problem for me is even though I succeed in color the geometry shapes, will this information be lost when I export the geometry group to a path:
System.Windows.Shapes.Path pathSaved = new System.Windows.Shapes.Path();
GeometryGroup GroupofDecorations = new GeometryGroup(){ FillRule = FillRule.Nonzero};
//So How to color the elements I add
GroupofDecorations.Children.Add(ColoredGeometryAdded);
pathSaved.Data = GroupofDecorations;
Hope somebody has an idea :) Because I cannot find anything