public IDE() { loadDummyObjects(); InitializeComponent(); this.DataContext = _myVM = new IDEVM(); _myVM.ShowNewDocumentDialog += _myVM_ShowNewDocumentDialog; _myVM.ShowResourcesDialog += _myVM_ShowResourcesDialog; }
private void _myVM_ShowNewDocumentDialog(IDEVM sender, DOM.DocumentVM document) { NewDocument newDocDialog = new NewDocument() { DataContext = document }; newDocDialog.Closed += (object sender1, EventArgs e1) => { if (newDocDialog.DialogResult.GetValueOrDefault(false)) { _myVM.CreateDocument(document); } }; newDocDialog.Show(); }