private void OnGlobalMouseRightButtonUp(object sender, MouseButtonEventArgsInt e) { if (_rightButtonDownInfo.IsEmpty == false) { QueryCloseOnUp(_rightButtonDownInfo, GetMouseDownInfo(e), e); } _rightButtonDownInfo = MouseButtonEventInfo.Empty; }
private void OnLocalMouseRightUp(object sender, MouseButtonEventArgs e) { if (_rightButtonDownInfo.IsEmpty == false) { var mouseButtonEventArgsInt = e.ToMouseButtonEventArgsInt(MouseButton.Right, MouseButtonState.Released); QueryCloseOnUp(_rightButtonDownInfo, GetMouseDownInfo(mouseButtonEventArgsInt), mouseButtonEventArgsInt); } _rightButtonDownInfo = MouseButtonEventInfo.Empty; }
private void QueryCloseOnUp(MouseButtonEventInfo downButtonEventInfo, MouseButtonEventInfo upEventInfo, MouseButtonEventArgsInt e) { var inside = upEventInfo.IsInside; if (inside == false) { if (downButtonEventInfo.IsInside == false) { QueryCloseCore(new MouseButtonEventPopupCloseReason(e.OriginalArgs)); } } }
private void ExitOpenState() { FocusObserver.KeyboardFocusedElementChanged -= OnKeyboardFocusedElementChanged; DetachGlobalMouseEvents(); #if !SILVERLIGHT _foregroundSession = _foregroundSession.DisposeExchange(); HwndMouseObserver.RemoveListener(this); #endif _leftButtonDownInfo = MouseButtonEventInfo.Empty; _rightButtonDownInfo = MouseButtonEventInfo.Empty; _state = State.Closed; }
private void OnLocalMouseRightDown(object sender, MouseButtonEventArgs e) { _rightButtonDownInfo = GetMouseDownInfo(e.ToMouseButtonEventArgsInt(MouseButton.Right, MouseButtonState.Pressed)); }
private void OnGlobalPreviewMouseRightButtonDown(object sender, MouseButtonEventArgsInt e) { _rightButtonDownInfo = GetMouseDownInfo(e); QueryCloseOnDown(e); }
private void OnGlobalMouseLeftButtonDown(object sender, MouseButtonEventArgsInt e) { _leftButtonDownInfo = GetMouseDownInfo(e); QueryCloseOnDown(e); }