private void SlightAdjustSettingsBtn_Click(object sender, RoutedEventArgs e) { if (_slightAdjustSettingsDialog == null || !_slightAdjustSettingsDialog.IsOpen) { _slightAdjustSettingsDialog = new SlightAdjustSettingsDialog(_resizeLab); _slightAdjustSettingsDialog.ShowDialog(); } else { _slightAdjustSettingsDialog.Activate(); } }