protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { ChopperViewModel cvm = (ChopperViewModel)DataContext; if (!cvm.WillInsert) { cvm.ChopperReset(); } }
private void ChopperOpen(object sender, RoutedEventArgs e) { ChopperViewModel ntvm = new ChopperViewModel((PianoRollViewModel)DataContext); NoteChopperWindow ncv = new NoteChopperWindow { DataContext = ntvm }; ncv.Show(); }