public HotkeySettingsControl() { InitializeComponent(); internalSettings = new HotkeySettings(); HotkeyTextBox.GettingFocus += HotkeyTextBox_GettingFocus; HotkeyTextBox.LosingFocus += HotkeyTextBox_LosingFocus; hook = new HotkeySettingsControlHook(Hotkey_KeyDown, Hotkey_KeyUp, Hotkey_IsActive); }
public HotkeySettingsControl() { InitializeComponent(); internalSettings = new HotkeySettings(); HotkeyTextBox.GettingFocus += HotkeyTextBox_GettingFocus; HotkeyTextBox.LosingFocus += HotkeyTextBox_LosingFocus; HotkeyTextBox.Unloaded += HotkeyTextBox_Unloaded; hook = new HotkeySettingsControlHook(Hotkey_KeyDown, Hotkey_KeyUp, Hotkey_IsActive, FilterAccessibleKeyboardEvents); }
public ShortcutControl() { InitializeComponent(); internalSettings = new HotkeySettings(); this.Unloaded += ShortcutControl_Unloaded; hook = new HotkeySettingsControlHook(Hotkey_KeyDown, Hotkey_KeyUp, Hotkey_IsActive, FilterAccessibleKeyboardEvents); ResourceLoader resourceLoader = ResourceLoader.GetForViewIndependentUse(); // We create the Dialog in C# because doing it in XAML is giving WinUI/XAML Island bugs when using dark theme. shortcutDialog = new ContentDialog { XamlRoot = this.XamlRoot, Title = resourceLoader.GetString("Activation_Shortcut_Title"), Content = c, PrimaryButtonText = resourceLoader.GetString("Activation_Shortcut_Save"), CloseButtonText = resourceLoader.GetString("Activation_Shortcut_Cancel"), DefaultButton = ContentDialogButton.Primary, }; shortcutDialog.PrimaryButtonClick += ShortcutDialog_PrimaryButtonClick; shortcutDialog.Opened += ShortcutDialog_Opened; shortcutDialog.Closing += ShortcutDialog_Closing; }