481 references to Mouse
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
InlineHints\InlineHintsTag.cs (1)
248var mousePoint = Mouse.GetPosition(hintUIElement);
Microsoft.VisualStudio.LanguageServices (1)
CommonControls\NewTypeDestinationSelection.xaml.cs (1)
54&& Mouse.LeftButton == MouseButtonState.Released)
PresentationCore (257)
MS\Internal\SynchronizedInputHelper.cs (4)
53re == Mouse.MouseDownEvent || 54re == Mouse.MouseUpEvent); 284e = new RoutedEvent[] {Mouse.MouseDownEvent}; 288e = new RoutedEvent[] {Mouse.MouseUpEvent};
System\Windows\ContentElement.cs (5)
267return (Mouse.DirectlyOver == this); 294Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 299Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 369return Mouse.Capture(this); 377Mouse.Capture(null);
System\Windows\Generated\ContentElement.cs (39)
820public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 827add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 828remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 839public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 846add { AddHandler(Mouse.MouseDownEvent, value, false); } 847remove { RemoveHandler(Mouse.MouseDownEvent, value); } 858public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 865add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 866remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 877public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 884add { AddHandler(Mouse.MouseUpEvent, value, false); } 885remove { RemoveHandler(Mouse.MouseUpEvent, value); } 1048public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 1055add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 1056remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 1067public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 1074add { AddHandler(Mouse.MouseMoveEvent, value, false); } 1075remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 1086public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 1093add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 1094remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 1105public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 1112add { AddHandler(Mouse.MouseWheelEvent, value, false); } 1113remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 1124public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 1131add { AddHandler(Mouse.MouseEnterEvent, value, false); } 1132remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 1143public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 1150add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 1151remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 1162public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 1169add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 1170remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 1181public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 1188add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 1189remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 1200public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 1207add { AddHandler(Mouse.QueryCursorEvent, value, false); } 1208remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement.cs (52)
740EventManager.RegisterClassHandler(type, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseDownThunk), true); 741EventManager.RegisterClassHandler(type, Mouse.MouseDownEvent, new MouseButtonEventHandler(UIElement.OnMouseDownThunk), true); 742EventManager.RegisterClassHandler(type, Mouse.PreviewMouseUpEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseUpThunk), true); 743EventManager.RegisterClassHandler(type, Mouse.MouseUpEvent, new MouseButtonEventHandler(UIElement.OnMouseUpThunk), true); 752EventManager.RegisterClassHandler(type, Mouse.PreviewMouseMoveEvent, new MouseEventHandler(UIElement.OnPreviewMouseMoveThunk), false); 753EventManager.RegisterClassHandler(type, Mouse.MouseMoveEvent, new MouseEventHandler(UIElement.OnMouseMoveThunk), false); 754EventManager.RegisterClassHandler(type, Mouse.PreviewMouseWheelEvent, new MouseWheelEventHandler(UIElement.OnPreviewMouseWheelThunk), false); 755EventManager.RegisterClassHandler(type, Mouse.MouseWheelEvent, new MouseWheelEventHandler(UIElement.OnMouseWheelThunk), false); 756EventManager.RegisterClassHandler(type, Mouse.MouseEnterEvent, new MouseEventHandler(UIElement.OnMouseEnterThunk), false); 757EventManager.RegisterClassHandler(type, Mouse.MouseLeaveEvent, new MouseEventHandler(UIElement.OnMouseLeaveThunk), false); 758EventManager.RegisterClassHandler(type, Mouse.GotMouseCaptureEvent, new MouseEventHandler(UIElement.OnGotMouseCaptureThunk), false); 759EventManager.RegisterClassHandler(type, Mouse.LostMouseCaptureEvent, new MouseEventHandler(UIElement.OnLostMouseCaptureThunk), false); 760EventManager.RegisterClassHandler(type, Mouse.QueryCursorEvent, new QueryCursorEventHandler(UIElement.OnQueryCursorThunk), false); 2773public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 2780add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 2781remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 2792public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 2799add { AddHandler(Mouse.MouseDownEvent, value, false); } 2800remove { RemoveHandler(Mouse.MouseDownEvent, value); } 2811public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 2818add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 2819remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 2830public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 2837add { AddHandler(Mouse.MouseUpEvent, value, false); } 2838remove { RemoveHandler(Mouse.MouseUpEvent, value); } 3001public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 3008add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 3009remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 3020public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 3027add { AddHandler(Mouse.MouseMoveEvent, value, false); } 3028remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 3039public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 3046add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 3047remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 3058public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 3065add { AddHandler(Mouse.MouseWheelEvent, value, false); } 3066remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 3077public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 3084add { AddHandler(Mouse.MouseEnterEvent, value, false); } 3085remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 3096public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 3103add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 3104remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 3115public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 3122add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 3123remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 3134public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 3141add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 3142remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 3153public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 3160add { AddHandler(Mouse.QueryCursorEvent, value, false); } 3161remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement3D.cs (39)
541public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 548add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 549remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 560public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 567add { AddHandler(Mouse.MouseDownEvent, value, false); } 568remove { RemoveHandler(Mouse.MouseDownEvent, value); } 579public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 586add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 587remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 598public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 605add { AddHandler(Mouse.MouseUpEvent, value, false); } 606remove { RemoveHandler(Mouse.MouseUpEvent, value); } 769public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 776add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 777remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 788public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 795add { AddHandler(Mouse.MouseMoveEvent, value, false); } 796remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 807public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 814add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 815remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 826public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 833add { AddHandler(Mouse.MouseWheelEvent, value, false); } 834remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 845public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 852add { AddHandler(Mouse.MouseEnterEvent, value, false); } 853remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 864public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 871add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 872remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 883public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 890add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 891remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 902public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 909add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 910remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 921public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 928add { AddHandler(Mouse.QueryCursorEvent, value, false); } 929remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Input\Command\CommandDevice.cs (2)
114e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent || 284return Mouse.DirectlyOver;
System\Windows\Input\Mouse.cs (32)
28public static readonly RoutedEvent PreviewMouseMoveEvent = EventManager.RegisterRoutedEvent("PreviewMouseMove", RoutingStrategy.Tunnel, typeof(MouseEventHandler), typeof(Mouse)); 53public static readonly RoutedEvent MouseMoveEvent = EventManager.RegisterRoutedEvent("MouseMove", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 78public static readonly RoutedEvent PreviewMouseDownOutsideCapturedElementEvent = EventManager.RegisterRoutedEvent("PreviewMouseDownOutsideCapturedElement", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 103public static readonly RoutedEvent PreviewMouseUpOutsideCapturedElementEvent = EventManager.RegisterRoutedEvent("PreviewMouseUpOutsideCapturedElement", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 128public static readonly RoutedEvent PreviewMouseDownEvent = EventManager.RegisterRoutedEvent("PreviewMouseDown", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 153public static readonly RoutedEvent MouseDownEvent = EventManager.RegisterRoutedEvent("MouseDown", RoutingStrategy.Bubble, typeof(MouseButtonEventHandler), typeof(Mouse)); 178public static readonly RoutedEvent PreviewMouseUpEvent = EventManager.RegisterRoutedEvent("PreviewMouseUp", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 203public static readonly RoutedEvent MouseUpEvent = EventManager.RegisterRoutedEvent("MouseUp", RoutingStrategy.Bubble, typeof(MouseButtonEventHandler), typeof(Mouse)); 228public static readonly RoutedEvent PreviewMouseWheelEvent = EventManager.RegisterRoutedEvent("PreviewMouseWheel", RoutingStrategy.Tunnel, typeof(MouseWheelEventHandler), typeof(Mouse)); 253public static readonly RoutedEvent MouseWheelEvent = EventManager.RegisterRoutedEvent("MouseWheel", RoutingStrategy.Bubble, typeof(MouseWheelEventHandler), typeof(Mouse)); 278public static readonly RoutedEvent MouseEnterEvent = EventManager.RegisterRoutedEvent("MouseEnter", RoutingStrategy.Direct, typeof(MouseEventHandler), typeof(Mouse)); 303public static readonly RoutedEvent MouseLeaveEvent = EventManager.RegisterRoutedEvent("MouseLeave", RoutingStrategy.Direct, typeof(MouseEventHandler), typeof(Mouse)); 328public static readonly RoutedEvent GotMouseCaptureEvent = EventManager.RegisterRoutedEvent("GotMouseCapture", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 353public static readonly RoutedEvent LostMouseCaptureEvent = EventManager.RegisterRoutedEvent("LostMouseCapture", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 378public static readonly RoutedEvent QueryCursorEvent = EventManager.RegisterRoutedEvent("QueryCursor", RoutingStrategy.Bubble, typeof(QueryCursorEventHandler), typeof(Mouse)); 410return Mouse.PrimaryDevice.DirectlyOver; 421return Mouse.PrimaryDevice.Captured; 432return Mouse.PrimaryDevice.CapturedMode; 444return Mouse.PrimaryDevice.Capture(element); 458return Mouse.PrimaryDevice.Capture(element, captureMode); 473if(Mouse.PrimaryDevice.IsActive) 498return Mouse.PrimaryDevice.OverrideCursor; 504Mouse.PrimaryDevice.OverrideCursor = value; 515return Mouse.PrimaryDevice.SetCursor(cursor); 525return Mouse.PrimaryDevice.LeftButton; 536return Mouse.PrimaryDevice.RightButton; 547return Mouse.PrimaryDevice.MiddleButton; 558return Mouse.PrimaryDevice.XButton1; 569return Mouse.PrimaryDevice.XButton2; 579return Mouse.PrimaryDevice.GetPosition(relativeTo); 587Mouse.PrimaryDevice.Synchronize(); 595Mouse.PrimaryDevice.UpdateCursor();
System\Windows\Input\MouseDevice.cs (29)
948queryCursor.RoutedEvent=Mouse.QueryCursorEvent; 1136lostCapture.RoutedEvent=Mouse.LostMouseCaptureEvent; 1144gotCapture.RoutedEvent=Mouse.GotMouseCaptureEvent; 1319if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1329clickThrough.RoutedEvent=Mouse.PreviewMouseDownOutsideCapturedElementEvent; 1335else if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1345clickThrough.RoutedEvent=Mouse.PreviewMouseUpOutsideCapturedElementEvent; 1783if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1817if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseWheelEvent) 1823wheel.RoutedEvent=Mouse.MouseWheelEvent; 1836if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1843down.RoutedEvent=Mouse.MouseDownEvent; 1849if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1855up.RoutedEvent=Mouse.MouseUpEvent; 1861if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1867move.RoutedEvent=Mouse.MouseMoveEvent; 1874if (e.StagingItem.Input.RoutedEvent == Mouse.QueryCursorEvent) 1914previewWheel.RoutedEvent=Mouse.PreviewMouseWheelEvent; 1934previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1943previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1952previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1961previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1970previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1979previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1988previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1997previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 2006previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 2015previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 2025previewMove.RoutedEvent=Mouse.PreviewMouseMoveEvent;
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
258Mouse.PrimaryDevice.LeftButton == MouseButtonState.Released;
System\Windows\Input\Stylus\Common\Stylus.cs (2)
753return Stylus.CurrentStylusDevice?.Captured ?? Mouse.Captured; 784return Mouse.Capture(element, captureMode);
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (4)
346if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 347e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 357stylus.Capture(Mouse.Captured, Mouse.CapturedMode);
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (3)
1099if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 1101Mouse.Capture(_stylusCapture, _captureMode);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (7)
505if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 506(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 507(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 559e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 562if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 568if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 575if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent)
System\Windows\Input\Stylus\Wisp\WispLogic.cs (12)
710if (!stylusIsDown && Mouse.Captured != null && !InWindowClientRect(ptMouse, mouseInputReport.InputSource)) 1149if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 1150e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 1168stylusDevice.Capture(Mouse.Captured, Mouse.CapturedMode); 1806if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 1807(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 1808(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 1860e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 1863if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1869if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1876if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
679if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 682Mouse.Capture(_stylusCapture, _captureMode);
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
815Mouse.UpdateCursor();
System\Windows\MouseOverProperty.cs (4)
49MouseEventArgs mouseEventArgs = new MouseEventArgs(Mouse.PrimaryDevice, Environment.TickCount, Mouse.PrimaryDevice.StylusDevice); 50mouseEventArgs.RoutedEvent = oldValue ? Mouse.MouseLeaveEvent : Mouse.MouseEnterEvent;
System\Windows\UIElement.cs (12)
2196if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2198else if(e.RoutedEvent == Mouse.MouseDownEvent) 2200else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2206if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2208else if(e.RoutedEvent == Mouse.MouseDownEvent) 2210else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2373return (Mouse.DirectlyOver == this); 2401Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 2406Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 2479return Mouse.Capture(this); 2487if (Mouse.Captured == this) 2489Mouse.Capture(null);
System\Windows\UIElement3D.cs (6)
354return (Mouse.DirectlyOver == this); 382Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 387Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 460return Mouse.Capture(this); 468if (Mouse.Captured == this) 470Mouse.Capture(null);
PresentationFramework (182)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
943Point currentPosition = Mouse.PrimaryDevice.GetPosition(textView.RenderScope);
MS\Internal\Documents\DocumentGridContextMenu.cs (1)
113uiScopeMouseDownPoint = Mouse.GetPosition(documentGrid);
MS\Internal\Ink\EditingCoordinator.cs (3)
436bool mouseDown = (_inkCanvas.IsMouseOver && Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed); 1012_inkCanvas.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnInkCanvasDeviceMove<MouseEventArgs>)); 1050_inkCanvas.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnInkCanvasDeviceMove<MouseEventArgs>));
MS\Internal\Ink\SelectionEditingBehavior.cs (5)
73MouseDevice mouse = Mouse.PrimaryDevice; 92InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 93InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 104InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 105InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove));
MS\Internal\Ink\SelectionEditor.cs (10)
70Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 90InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 91InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 92InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 93InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent)); 95Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 105InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 106InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 107InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 108InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent));
System\Windows\Controls\ComboBox.cs (21)
58EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 59EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true); // call us even if the transparent button in the style gets the click. 60EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 61EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(OnPreviewMouseButtonDown)); 62EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseWheelEvent, new MouseWheelEventHandler(OnMouseWheel), true); // call us even if textbox in the style gets the click. 234Mouse.Capture(comboBox, CaptureMode.SubTree); 307Mouse.Capture(null); 1278if (IsDropDownOpen && Mouse.Captured == this && DidMouseMove()) 1686if (Mouse.Captured != comboBox) 1692if (Mouse.Captured == null || !MenuBase.IsDescendant(comboBox, Mouse.Captured as DependencyObject)) 1702if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 1704Mouse.Capture(comboBox, CaptureMode.SubTree); 1732if (Mouse.Captured == comboBox && e.OriginalSource == comboBox) 1735Debug.Assert(!comboBox.CheckAccess() || Mouse.Captured != comboBox, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1783Debug.Assert(!CheckAccess() || Mouse.Captured != this, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1811if (Mouse.LeftButton == MouseButtonState.Pressed && comboBox.HasMouseEnteredItemsHost) 1813if (Mouse.Captured == comboBox) 1815if (Mouse.LeftButton == MouseButtonState.Pressed) 1879if (Mouse.LeftButton == MouseButtonState.Pressed 1928return Mouse.Captured == this;
System\Windows\Controls\ContextMenu.cs (2)
528if (Mouse.LeftButton == MouseButtonState.Pressed) 532if (Mouse.RightButton == MouseButtonState.Pressed)
System\Windows\Controls\DataGrid.cs (11)
1742if (Mouse.LeftButton == MouseButtonState.Pressed) 4810if (Mouse.Capture(this, CaptureMode.SubTree)) 4813_dragPoint = Mouse.GetPosition(this); 4820if (Mouse.Captured == this) 6261Point currentMousePosition = Mouse.GetPosition(this); 6442Point pt = Mouse.GetPosition(row); 6562Point pt = Mouse.GetPosition(cell); 6572Point rowPt = Mouse.GetPosition(rowOwner); 6612UIElement element = Mouse.DirectlyOver as UIElement; 6633UIElement element = Mouse.DirectlyOver as UIElement; 6664Point pt = Mouse.GetPosition(itemsHost);
System\Windows\Controls\DataGridCell.cs (1)
942dataGridOwner.HandleSelectionForCellInput(this, /* startDragging = */ Mouse.Captured == null, /* allowsExtendSelect = */ true, /* allowsMinimalSelect = */ true);
System\Windows\Controls\DataGridTextColumn.cs (1)
189if ((mouseArgs == null) || !PlaceCaretOnTextBox(textBox, Mouse.GetPosition(textBox)))
System\Windows\Controls\GridViewColumnHeader.cs (2)
237(IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed))) 806Point pos = Mouse.PrimaryDevice.GetPosition(this);
System\Windows\Controls\InkCanvas.cs (4)
70EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, 76EventManager.RegisterClassHandler(ownerType, Mouse.MouseUpEvent, 81EventManager.RegisterClassHandler(ownerType, Mouse.QueryCursorEvent, 2904Mouse.UpdateCursor();
System\Windows\Controls\ItemsControl.cs (5)
3372Point mousePosition = Mouse.GetPosition(relativeTo); 3380NavigateByLine(startingInfo, FocusNavigationDirection.Up, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3385NavigateByLine(startingInfo, FocusNavigationDirection.Down, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3400NavigateByLine(startingInfo, direction, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3410NavigateByLine(startingInfo, direction, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers));
System\Windows\Controls\ListBox.cs (8)
79EventManager.RegisterClassHandler(typeof(ListBox), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseButtonUp), true); 555if (e.OriginalSource == this && Mouse.Captured == this) 557if (Mouse.LeftButton == MouseButtonState.Pressed) 704if (mouseButton == MouseButton.Left && Mouse.Captured != this) 706Mouse.Capture(this, CaptureMode.SubTree); 772if ((Mouse.Captured == this) && DidMouseMove()) 774NavigateToItem(ItemInfoFromContainer(listItem), new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 968if (Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\ListBoxItem.cs (1)
307if (parent != null && Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\Menu.cs (1)
341if (Mouse.Captured != null)
System\Windows\Controls\MenuItem.cs (6)
867if ((Mouse.LeftButton == MouseButtonState.Pressed) && 869itemBounds.Contains(Mouse.GetPosition(this))) 1558if (Mouse.Captured == null || Mouse.Captured is MenuBase) 2484if ((Mouse.Captured == elem) && (Mouse.DirectlyOver == elem))
System\Windows\Controls\PopupControlService.cs (12)
57if ((Mouse.LeftButton == MouseButtonState.Pressed) || 58(Mouse.RightButton == MouseButtonState.Pressed)) 64IInputElement directlyOver = Mouse.PrimaryDevice.RawDirectlyOver; 70if (Mouse.CapturedMode != CaptureMode.None) 78Point pt = Mouse.PrimaryDevice.GetPosition(rootAsUIElement); 124else if (e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent) 128else if (e.StagingItem.Input.RoutedEvent == Mouse.MouseDownEvent) 210IInputElement directlyOver = Mouse.PrimaryDevice.RawDirectlyOver; 213Point pt = Mouse.PrimaryDevice.GetPosition(directlyOver); 1593PresentationSource mouseSource = Mouse.PrimaryDevice.CriticalActiveSource; 1594System.Windows.Point pt = Mouse.PrimaryDevice.NonRelativePosition; 1614System.Windows.Point pt2 = hwndSource.TransformToDevice(Mouse.PrimaryDevice.GetPosition(rootElement));
System\Windows\Controls\Primitives\ButtonBase.cs (3)
134if (IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) && !IsSpaceKeyDown) 160Point pos = Mouse.PrimaryDevice.GetPosition(this); 519((IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) && !IsSpaceKeyDown)))
System\Windows\Controls\Primitives\CalendarItem.cs (2)
676Mouse.Capture(this, CaptureMode.SubTree); 879Mouse.Capture(this, CaptureMode.SubTree);
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (1)
605Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
138dataGridOwner.HandleSelectionForRowHeaderAndDetailsInput(rowOwner, /* startDragging = */ Mouse.Captured == null);
System\Windows\Controls\Primitives\DataGridRowHeader.cs (1)
560if (Mouse.Captured == this)
System\Windows\Controls\Primitives\MenuBase.cs (16)
55EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown)); 56EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseButtonUp)); 57EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 60EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnPromotedMouseButton)); 61EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnPromotedMouseButton)); 63EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 64EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.PreviewMouseUpOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 544if (Mouse.Captured != menu) 550if (Mouse.Captured == null || !MenuBase.IsDescendant(menu, Mouse.Captured as DependencyObject)) 560if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 562Mouse.Capture(menu, CaptureMode.SubTree); 783return Mouse.Captured == this; 817if (!IsDescendant(this, Mouse.Captured as Visual) && !Mouse.Capture(this, CaptureMode.SubTree)) 874Mouse.Capture(null);
System\Windows\Controls\Primitives\Popup.cs (17)
60EventManager.RegisterClassHandler(typeof(Popup), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 1102Debug.Assert( Mouse.Captured == _popupRoot, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot"); 1133IInputElement capturedElement = Mouse.Captured; 1144if (Mouse.LeftButton != MouseButtonState.Released || 1145Mouse.RightButton != MouseButtonState.Released) 1167Mouse.Capture(_popupRoot, CaptureMode.SubTree); 1181if (Mouse.Captured == _popupRoot) 1185Mouse.Capture(null); 1225bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1234if(Mouse.Captured != root) 1239PopupRoot newRoot = Mouse.Captured as PopupRoot; 1244bool newCaptureInsidePopup = childPopupTookCapture || (Mouse.Captured != null && MenuBase.IsDescendant(root, Mouse.Captured as DependencyObject)); 1245bool newCaptureOutsidePopup = !newCaptureInsidePopup && Mouse.Captured != root; 1369e.RoutedEvent != Mouse.LostMouseCaptureEvent; 3027if (Mouse.DirectlyOver != null) 3040Point pt = Mouse.GetPosition(relativeTarget);
System\Windows\Controls\Primitives\Selector.cs (2)
1019_lastMousePosition = Mouse.GetPosition(this); 1026Point newPosition = Mouse.GetPosition(this);
System\Windows\Controls\Primitives\Thumb.cs (2)
58EventManager.RegisterClassHandler(typeof(Thumb), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 286if (Mouse.Captured != thumb)
System\Windows\Controls\Primitives\Track.cs (1)
809Mouse.Synchronize();
System\Windows\Controls\Slider.cs (1)
77EventManager.RegisterClassHandler(typeof(Slider), Mouse.MouseDownEvent, new MouseButtonEventHandler(Slider._OnMouseLeftButtonDown),true);
System\Windows\Controls\StickyNote.cs (2)
113EventManager.RegisterClassHandler(owner, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(_OnPreviewDeviceDown<MouseButtonEventArgs>)); 114EventManager.RegisterClassHandler(owner, Mouse.MouseDownEvent, new MouseButtonEventHandler(_OnDeviceDown<MouseButtonEventArgs>));
System\Windows\Controls\ToolBar.cs (5)
81EventManager.RegisterClassHandler(typeof(ToolBar), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true); 258Mouse.Capture(toolBar, CaptureMode.SubTree); 270if (Mouse.Captured == toolBar) 272Mouse.Capture(null); 583if (Mouse.Captured == null)
System\Windows\Controls\ToolBarTray.cs (1)
532Point pointRelativeToToolBarTray = Mouse.PrimaryDevice.GetPosition((IInputElement)this);
System\Windows\Controls\TreeViewItem.cs (1)
48EventManager.RegisterClassHandler(typeof(TreeViewItem), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true);
System\Windows\Controls\VirtualizingStackPanel.cs (1)
9427if ((Mouse.LeftButton == MouseButtonState.Pressed) &&
System\Windows\Documents\Hyperlink.cs (2)
52EventManager.RegisterClassHandler(typeof(Hyperlink), Mouse.QueryCursorEvent, new QueryCursorEventHandler(OnQueryCursor)); 992Mouse.Capture(element);
System\Windows\Documents\ImmComposition.cs (3)
1633if (Mouse.LeftButton == MouseButtonState.Pressed) 1637if (Mouse.RightButton == MouseButtonState.Pressed) 1642Point point = Mouse.GetPosition(RenderScope);
System\windows\Documents\TextEditorContextMenu.cs (3)
58Point renderScopeMouseDownPoint = Mouse.GetPosition(This.TextView.RenderScope); 108if (!TextEditorMouse.IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope))) 212Point uiScopeMouseDownPoint = Mouse.GetPosition(This.UiScope);
System\windows\Documents\TextEditorMouse.cs (6)
51EventManager.RegisterClassHandler(controlType, Mouse.QueryCursorEvent, new QueryCursorEventHandler(OnQueryCursor)); 53EventManager.RegisterClassHandler(controlType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDown)); 54EventManager.RegisterClassHandler(controlType, Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 55EventManager.RegisterClassHandler(controlType, Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 413if (IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope))) 723Mouse.UpdateCursor();
System\windows\Documents\TextEditorTyping.cs (4)
75EventManager.RegisterClassHandler(controlType, Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove), true /* handledEventsToo */); 76EventManager.RegisterClassHandler(controlType, Mouse.MouseLeaveEvent, new MouseEventHandler(OnMouseLeave), true /* handledEventsToo */); 1897TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false); 1903Mouse.UpdateCursor();
System\Windows\Documents\TextStore.cs (3)
2987if (Mouse.LeftButton == MouseButtonState.Pressed) 2991if (Mouse.RightButton == MouseButtonState.Pressed) 3004Point point = Mouse.GetPosition(RenderScope);
System\Windows\FrameworkContentElement.cs (3)
99EventManager.RegisterClassHandler(typeof(FrameworkContentElement), Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkContentElement.OnQueryCursor), true); 939Mouse.UpdateCursor(); 971Mouse.UpdateCursor();
System\Windows\FrameworkElement.cs (3)
2388EventManager.RegisterClassHandler(_typeofThis, Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkElement.OnQueryCursorOverride), true); 3891Mouse.UpdateCursor(); 3926Mouse.UpdateCursor();
System\Windows\Input\KeyboardNavigation.cs (2)
3245else if (inputEventArgs.RoutedEvent == Mouse.MouseDownEvent 3246|| inputEventArgs.RoutedEvent == Mouse.MouseUpEvent)
System\Windows\Window.cs (1)
263if (Mouse.LeftButton == MouseButtonState.Pressed)
System.Windows.Controls.Ribbon (40)
Microsoft\Windows\Controls\KeyTipService.cs (2)
698else if (routedEvent == Mouse.PreviewMouseDownEvent || 712else if (routedEvent == Mouse.PreviewMouseWheelEvent)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
101EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 102EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk)); 971if (!this.IsMinimized && (SelectedIndex >= 0) && (Mouse.Captured == this || Mouse.Captured == null))
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (2)
50EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 213if (Mouse.Captured == this &&
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
2652Debug.Assert(e.RoutedEvent == Mouse.MouseMoveEvent || e.RoutedEvent == Mouse.MouseLeaveEvent);
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (3)
77EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 78EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk), true /* handledEventsToo */); 80EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true);
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (17)
1030if (Mouse.Captured == null) 1046if (Mouse.Captured == null) 1048PresentationSource mouseSource = Mouse.PrimaryDevice.ActiveSource; 1074else if (!RibbonHelper.IsAncestorOf(targetCapture, Mouse.Captured as DependencyObject)) 1081if (Mouse.Captured == null) 1105bool success = Mouse.Capture(targetCapture, CaptureMode.SubTree); 1119Point position = Mouse.GetPosition(element); 1145UIElement source = Mouse.Captured as UIElement; 1203(Mouse.Captured == null || 1206Mouse.Capture(targetCapture, CaptureMode.SubTree); 1223Mouse.Captured != null && 1226Mouse.Capture(null); 1335return (Mouse.Captured == element || 1336RibbonHelper.IsAncestorOf(element, Mouse.Captured as DependencyObject)); 1341return (element != null && Mouse.Captured != null && (Mouse.Captured == element || 1342TreeHelper.IsVisualAncestorOf(element, Mouse.Captured as DependencyObject)));
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (4)
71EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 72EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true); 1118if (Mouse.Captured == this) 1124Mouse.Capture(null);
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (3)
70EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 771if ((Mouse.LeftButton == MouseButtonState.Pressed) && 773itemBounds.Contains(Mouse.GetPosition(this)))
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (3)
117EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 118EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk), true /* handledEventsToo */); 120EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true);