private void HotkeyTextBox_LosingFocus(object sender, RoutedEventArgs e) { if (lastValidSettings != null && (lastValidSettings.IsValid() || lastValidSettings.IsEmpty())) { HotkeySettings = lastValidSettings.Clone(); } HotkeyTextBox.Text = hotkeySettings.ToString(); if (AutomationPeer.ListenerExists(AutomationEvents.PropertyChanged)) { TextBoxAutomationPeer peer = FrameworkElementAutomationPeer.FromElement(HotkeyTextBox) as TextBoxAutomationPeer; string textBoxChangeActivityId = "textBoxChangedOnLosingFocus"; if (peer != null) { peer.RaiseNotificationEvent( AutomationNotificationKind.ActionCompleted, AutomationNotificationProcessing.ImportantMostRecent, HotkeyTextBox.Text, textBoxChangeActivityId); } } _isActive = false; }
private void HotkeyTextBox_LosingFocus(object sender, RoutedEventArgs e) { if (internalSettings.IsValid() || internalSettings.IsEmpty()) { HotkeySettings = internalSettings; } HotkeyTextBox.Text = hotkeySettings.ToString(); }
private void HotkeyTextBox_LosingFocus(object sender, RoutedEventArgs e) { if (lastValidSettings != null && (lastValidSettings.IsValid() || lastValidSettings.IsEmpty())) { HotkeySettings = lastValidSettings.Clone(); } HotkeyTextBox.Text = hotkeySettings.ToString(); _isActive = false; }
private static bool ComboIsValid(HotkeySettings settings) { if (settings != null && (settings.IsValid() || settings.IsEmpty())) { return(true); } else { return(false); } }