title: Problems drawing an "x" in the center of a circle using XAML
body: <p>I am trying to create a red circle with a black x through it using XAML.<br>
  My problem is that they aren't aligned correctly.<br>
  What is the right way to do this?</p>
  
  <p>This is what I've got so far:</p>
  
  <pre><code>  &lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
        &lt;RowDefinition Height="Auto"/&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
        &lt;ColumnDefinition Width="Auto"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Image&gt;
      &lt;Image.Source&gt;
        &lt;DrawingImage&gt;
          &lt;DrawingImage.Drawing&gt;
            &lt;DrawingGroup&gt;
              &lt;GeometryDrawing Brush="Red"&gt;
                &lt;GeometryDrawing.Pen&gt;
                  &lt;Pen Brush="Transparent" Thickness="0"/&gt;
                &lt;/GeometryDrawing.Pen&gt;
                &lt;GeometryDrawing.Geometry&gt;
                  &lt;EllipseGeometry Center="8,8" RadiusX="8" RadiusY="8"/&gt;
                &lt;/GeometryDrawing.Geometry&gt;
              &lt;/GeometryDrawing&gt;
              &lt;GeometryDrawing&gt;
                &lt;GeometryDrawing.Pen&gt;
                  &lt;Pen Brush="Black" Thickness="2.5"/&gt;
                &lt;/GeometryDrawing.Pen&gt;
                &lt;GeometryDrawing.Geometry&gt;
                  &lt;PathGeometry&gt;
                    &lt;PathFigure StartPoint="4,4"&gt;
                      &lt;LineSegment Point="12,12"/&gt;
                    &lt;/PathFigure&gt;
                    &lt;PathFigure StartPoint="4,12"&gt;
                      &lt;LineSegment Point="12,4"/&gt;
                    &lt;/PathFigure&gt;
                  &lt;/PathGeometry&gt;
                &lt;/GeometryDrawing.Geometry&gt;
              &lt;/GeometryDrawing&gt;
            &lt;/DrawingGroup&gt;
          &lt;/DrawingImage.Drawing&gt;
        &lt;/DrawingImage&gt;
      &lt;/Image.Source&gt;
      &lt;/Image&gt;
    &lt;/Grid&gt;
  </code></pre>
  
  <p>Simply putting an ellipse in the same grid with a black X the X isn't quite centered on the ellipse because the coordinates of each line you draw are really coordinates within the space allotted for it. </p>
  
  <p>I think they needed to be in some sort of geometry or drawing aggregate to give them the same coordinate system. The geometry group and path are aggregators but both require their contents to have the same fill and stroke and the stroke and fill is different for the red circle (no stroke) and the black X (no fill). </p>
  
  <p>The only aggregator that gives common coordinate systems and allows different fills &amp; strokes for its members that I could find was the DrawingGroup. </p>
  
  <p>The string shortcuts that work for creating a Path via its Data property don't appear to work for creating a PathGeometry so all had to be filled in by hand.</p>