title: How to color PathGeometry or GeomtryGroup? For c# Windows phone
body: <p>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 <a href="http://www.c-sharpcorner.com/uploadfile/mahesh/path-in-wpf/" rel="nofollow noreferrer">this link</a>. 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.</p>
  
  <p><a href="https://stackoverflow.com/questions/19450265/different-fill-behavior-inside-a-path-geometrygroup">Different fill behavior inside a Path GeometryGroup</a></p>
  
  <p><a href="https://stackoverflow.com/questions/11766954/filling-color-in-a-hexagon-in-wpf">Filling Color in a hexagon in WPF</a></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/aa970904%28v=vs.110%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa970904%28v=vs.110%29.aspx</a></p>
  
  <p>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:</p>
  
  <pre><code>            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;
  </code></pre>
  
  <p>Hope somebody has an idea :) Because I cannot find anything</p>