title: Get Brush from Color without SolidColorBrush
body: <p>It looks like the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.solidcolorbrush.aspx" rel="nofollow noreferrer">SolidColorBrush</a> requires .NET 3 or up, and I have a requirement to keep away from requiring manufacturing computers go through an upgrade.</p>
  
  <p>So, given a <a href="http://msdn.microsoft.com/en-us/library/system.drawing.color.aspx" rel="nofollow noreferrer">System.Drawing.Color</a> <code>color</code>, how would I create a <a href="http://msdn.microsoft.com/en-us/library/system.drawing.brush.aspx" rel="nofollow noreferrer">System.Drawing.Brush</a>?</p>
  
  <pre><code>public static Brush GetBrush(Color color) {
    Brush result = Brushes.Black;
    // What goes here?
    return result;
  }
  </code></pre>
  
  <p>The only static methods I see in Brushes are <code>Equals</code> and <code>ReferenceEquals</code>; non-static is only <code>Clone</code>.</p>
  
  <p><strong>EDIT:</strong> (Resolved - thanks <a href="https://stackoverflow.com/users/34397/slaks">SLaks</a>)</p>
  
  <p>Using <a href="http://msdn.microsoft.com/en-us/library/system.drawing.solidbrush.aspx" rel="nofollow noreferrer">System.Drawing.SolidBrush</a>, I am able to write:</p>
  
  <pre><code>public static Brush GetBrush(Color color) {
    if (color != Color.Empty) {
      return new SolidBrush(color);
    }
    return Brushes.Black;
  }
  </code></pre>