title: Draw a filled triangle in DrawingContext
body: <p><em>This is a follow up from this <a href="https://stackoverflow.com/questions/4725686/how-to-best-display-large-number-of-items-in-program">question</a>.</em></p>
  
  <h2>Question:</h2>
  
  <p>I am trying to draw a filled triangle using <code>DrawingContext</code>, which is rendered on a <code>DrawingVisual</code></p>
  
  <p>Currently, I have managed to draw the outline of a triangle using the following C# code:</p>
  
  <pre><code>private DrawingVisual CreateTriangle()
    {
       DrawingVisual triangle = new DrawingVisual();
       using ( DrawingContext dc = triangle.RenderOpen() )
       {
           Pen drawingPen = new Pen(Brushes.Black,3);
           dc.DrawLine(drawingPen, new Point(0, 50), new Point(50, 0));
           dc.DrawLine(drawingPen, new Point(50, 0), new Point(50, 100));
           dc.DrawLine(drawingPen, new Point(50, 100), new Point(0, 50));
  
       }
       return triangle;
    }
  </code></pre>
  
  <p>I get this:</p>
  
  <p><img src="https://i.stack.imgur.com/zs9dc.png" alt="Unfilled Triangle"></p>
  
  <p>How do I draw a triangle that, in addition to th border I have drawn also has a red fill?</p>
  
  <p><img src="https://i.stack.imgur.com/f6tpf.png" alt="Filled Triangle"></p>