title: How to open a dialog center-screen or center-owner?
body: <p>I have a MVVM application and I have a main viewmodel. In this model I use the following code to open a dialog:</p>
  
  <pre><code>dlgViewModel myDlgViewModel = new dlgViewModel();
  dlgView myDlgView = new dlgView();
  myDlgView.DataContext = myDlgViewModel;
  myDlgView.Owner = App.Current.MainWindow;
  myDlgView.WindowStartupLocation = WindowStartupLocation.CenterOwner;
  myDlgView.ShowDialog();
  </code></pre>
  
  <p>Also, in the XAML on my dlgView, I set the WIndowsStartupLocation to CenterOwner. However the window does not open in the center of the owner. I tried CenterScreeen but that does not work either.</p>
  
  <p>How can I open a new view using the centerOwner or centerScreen option?</p>