title: Call Button OnClick from ViewModel
body: <p>I have a button as follows,</p>
  
  <pre><code>&lt;Button Height="40" Width="40" x:Name="btnup" Command="{Binding UpCommand}" CommandParameter="{Binding ElementName=dgEntities,Path=SelectedItem}" Click="Btnup_OnClick"&gt;
  </code></pre>
  
  <p>In the ViewModel I have a UpCommand and in the XAML.cs I have Btnup_OnClick event. Is there a possibility to call Btnup_OnClick event in the UpCommand in the viewmodel. Please help. I want the command to be executed after OnClick.</p>