private void OnPreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (QuickSwitchesBlock.GetIsActive(Popup)) { e.Handled = true; } }
private void ToggleQuickSwitches(bool force = true) { if (QuickSwitchesBlock.GetIsActive(Popup)) { QuickSwitchesBlock.SetIsActive(Popup, false); } else if (force || _openOnNext) { InitializePopup(); QuickSwitchesBlock.SetIsActive(Popup, true); Popup.Focus(); } }
private async void ShowQuickSwitchesPopup(Geometry icon, string message, object toolTip) { if (QuickSwitchesBlock.GetIsActive(Popup)) { return; } var id = ++_popupId; QuickSwitchesNotificationIcon.Data = icon; QuickSwitchesNotificationText.Text = message?.ToUpper(CultureInfo.CurrentUICulture); QuickSwitchesNotification.IsOpen = true; QuickSwitchesNotification.ToolTip = toolTip; await Task.Delay(2000); if (_popupId == id) { QuickSwitchesNotification.IsOpen = false; } }
private void OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e) { _openOnNext = !QuickSwitchesBlock.GetIsActive(Popup); }