public MainWindow(MainWindowViewModel viewModel) { InitializeComponent(); this.DataContext = viewModel; viewModel.LinkedWindow = this; }
private void DoAction() { MainWindowViewModel vm = new MainWindowViewModel(); MainWindow view = new MainWindow(vm); GeneralHelper.SetRevitAsWindowOwner(view); view.ShowDialog(); }