title: How to pass a UserControl with CommandParameter?
body: <p>I have using a DelegateCommand and i want to pass the UserControl with Command.</p>
  
  <pre><code>#region OpenViewCommand
  private DelegateCommand&lt;UserControl&gt; _openViewCommand;
  public ICommand OpenViewCommand
  {
      get
      {
          if (_openViewCommand == null)
              _openViewCommand = new DelegateCommand&lt;UserControl&gt;(new Action&lt;UserControl&gt;(OpenView));
          return _openViewCommand;
      }
  }
  
  public void OpenView(UserControl ViewName)
  {
      UserControl ctrl = (UserControl)ViewName;
      JIMS.Controls.Message.Show(ViewName.ToString());
  }
  #endregion
  </code></pre>
  
  <p>Command in XAML</p>
  
  <pre><code>&lt;Button Name="btnStockGroups" Command="{Binding OpenViewCommand}" CommandParameter="JIMS.View.Stock.StockGroups"&gt;stock group&lt;/Button&gt;
  </code></pre>