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