public App() { w = new MyWindow(); //You also can pass Action to open new window of some sort here //or other things, that VM can't have access to vm = new MyViewModel(true); w.DataContext = vm; w.Show(); }
private void OpenDialog_Clicked(object sender, EventArgs eventArgs) { var dialog = new MyWindow(this); dialog.Show(); }