protected override void OnClick() { if (_isOpen) { return; } _isOpen = true; _dlg = new WindowStyling(); _dlg.Closing += bld_Closing; _dlg.Owner = FrameworkApplication.Current.MainWindow; _dlg.Show(); }
void bld_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _dlg = null; _isOpen = false; }