title: Fill color from property via XAML
body: <p>I am learning WPF and have this simple question.<br>
  How do I set fill color to property vi XAML?  </p>
  
  <pre><code>&lt;Rectangle Fill="{Binding Path=BackgroundColorf}" 
             Height="112" Margin="0,84,0,0" VerticalAlignment="Top" 
             Width="116"/&gt;
  </code></pre>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>public partial class MainWindow : Window
  {
  
           /// &lt;summary&gt;
          /// Gets or sets the BackgroundColor.  
          /// &lt;/summary&gt;
     public SolidColorBrush BackgroundColorf
     {
         get;
         set;
     }
  
     public MainWindow()
     {
         this.InitializeComponent();
         BackgroundColorf =  new SolidColorBrush(Colors.Red); 
     }
  }
  </code></pre>