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