protected override void OnClosed(EventArgs e) { base.OnClosed(e); ParticleConstraintDialogueVM vm = DataContext as ParticleConstraintDialogueVM; vm.Close(); }
void SetupDataContext() { ParticleConstraintDialogueVM vm = new ParticleConstraintDialogueVM(); DataContext = vm; if (vm.CloseAction == null) { vm.CloseAction = new Action(Close); } }