title: How to pass parameters to usercontrol's viewmodel through window's xaml?
body: <p>How to pass parameters to usercontrol's viewmodel through window's xaml? I am using MVVM  pattern. 
  I have tried creating a dependency property as below. But passing it in constructoe of viewmodel throws "nonstatic properties cannot be field initializers" exception.
  xaml.cs of usercontrol</p>
  
  <pre><code>public partial class SomeView : UserControl
  {   
      SomeViewModel vm = new SomeViewModel(ForeColor);
  
      public SomeView()
      {
          InitializeComponent();
          this.DataContext = vm;
      }
  
      public Color ForeColor
      {
          get { return (Color)this.GetValue(ForeColorProperty); }
          set { this.SetValue(ForeColorProperty, value); }
      }
  
      public static readonly DependencyProperty ForeColorProperty = DependencyProperty.Register("ForeColor", typeof(Color), typeof(SomeView ));
  }
  </code></pre>
  
  <p>and this is how I am calling the user control</p>
  
  <pre><code> &lt;local:SomeView ForeColor="{Binding Foreground}"/&gt;
  </code></pre>
  
  <p>Foreground is a property of type System.Drawing.Color </p>