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)
49re == Mouse.MouseDownEvent || 50re == Mouse.MouseUpEvent); 280e = new RoutedEvent[] {Mouse.MouseDownEvent}; 284e = new RoutedEvent[] {Mouse.MouseUpEvent};
System\Windows\ContentElement.cs (5)
256return (Mouse.DirectlyOver == this); 283Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 288Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 358return Mouse.Capture(this); 366Mouse.Capture(null);
System\Windows\Generated\ContentElement.cs (39)
808public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 815add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 816remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 827public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 834add { AddHandler(Mouse.MouseDownEvent, value, false); } 835remove { RemoveHandler(Mouse.MouseDownEvent, value); } 846public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 853add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 854remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 865public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 872add { AddHandler(Mouse.MouseUpEvent, value, false); } 873remove { RemoveHandler(Mouse.MouseUpEvent, value); } 1036public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 1043add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 1044remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 1055public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 1062add { AddHandler(Mouse.MouseMoveEvent, value, false); } 1063remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 1074public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 1081add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 1082remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 1093public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 1100add { AddHandler(Mouse.MouseWheelEvent, value, false); } 1101remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 1112public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 1119add { AddHandler(Mouse.MouseEnterEvent, value, false); } 1120remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 1131public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 1138add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 1139remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 1150public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 1157add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 1158remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 1169public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 1176add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 1177remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 1188public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 1195add { AddHandler(Mouse.QueryCursorEvent, value, false); } 1196remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement.cs (52)
728EventManager.RegisterClassHandler(type, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseDownThunk), true); 729EventManager.RegisterClassHandler(type, Mouse.MouseDownEvent, new MouseButtonEventHandler(UIElement.OnMouseDownThunk), true); 730EventManager.RegisterClassHandler(type, Mouse.PreviewMouseUpEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseUpThunk), true); 731EventManager.RegisterClassHandler(type, Mouse.MouseUpEvent, new MouseButtonEventHandler(UIElement.OnMouseUpThunk), true); 740EventManager.RegisterClassHandler(type, Mouse.PreviewMouseMoveEvent, new MouseEventHandler(UIElement.OnPreviewMouseMoveThunk), false); 741EventManager.RegisterClassHandler(type, Mouse.MouseMoveEvent, new MouseEventHandler(UIElement.OnMouseMoveThunk), false); 742EventManager.RegisterClassHandler(type, Mouse.PreviewMouseWheelEvent, new MouseWheelEventHandler(UIElement.OnPreviewMouseWheelThunk), false); 743EventManager.RegisterClassHandler(type, Mouse.MouseWheelEvent, new MouseWheelEventHandler(UIElement.OnMouseWheelThunk), false); 744EventManager.RegisterClassHandler(type, Mouse.MouseEnterEvent, new MouseEventHandler(UIElement.OnMouseEnterThunk), false); 745EventManager.RegisterClassHandler(type, Mouse.MouseLeaveEvent, new MouseEventHandler(UIElement.OnMouseLeaveThunk), false); 746EventManager.RegisterClassHandler(type, Mouse.GotMouseCaptureEvent, new MouseEventHandler(UIElement.OnGotMouseCaptureThunk), false); 747EventManager.RegisterClassHandler(type, Mouse.LostMouseCaptureEvent, new MouseEventHandler(UIElement.OnLostMouseCaptureThunk), false); 748EventManager.RegisterClassHandler(type, Mouse.QueryCursorEvent, new QueryCursorEventHandler(UIElement.OnQueryCursorThunk), false); 2761public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 2768add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 2769remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 2780public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 2787add { AddHandler(Mouse.MouseDownEvent, value, false); } 2788remove { RemoveHandler(Mouse.MouseDownEvent, value); } 2799public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 2806add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 2807remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 2818public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 2825add { AddHandler(Mouse.MouseUpEvent, value, false); } 2826remove { RemoveHandler(Mouse.MouseUpEvent, value); } 2989public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 2996add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 2997remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 3008public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 3015add { AddHandler(Mouse.MouseMoveEvent, value, false); } 3016remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 3027public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 3034add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 3035remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 3046public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 3053add { AddHandler(Mouse.MouseWheelEvent, value, false); } 3054remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 3065public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 3072add { AddHandler(Mouse.MouseEnterEvent, value, false); } 3073remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 3084public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 3091add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 3092remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 3103public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 3110add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 3111remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 3122public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 3129add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 3130remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 3141public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 3148add { AddHandler(Mouse.QueryCursorEvent, value, false); } 3149remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement3D.cs (39)
533public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 540add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 541remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 552public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 559add { AddHandler(Mouse.MouseDownEvent, value, false); } 560remove { RemoveHandler(Mouse.MouseDownEvent, value); } 571public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 578add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 579remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 590public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 597add { AddHandler(Mouse.MouseUpEvent, value, false); } 598remove { RemoveHandler(Mouse.MouseUpEvent, value); } 761public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 768add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 769remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 780public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 787add { AddHandler(Mouse.MouseMoveEvent, value, false); } 788remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 799public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 806add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 807remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 818public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 825add { AddHandler(Mouse.MouseWheelEvent, value, false); } 826remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 837public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 844add { AddHandler(Mouse.MouseEnterEvent, value, false); } 845remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 856public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 863add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 864remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 875public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 882add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 883remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 894public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 901add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 902remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 913public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 920add { AddHandler(Mouse.QueryCursorEvent, value, false); } 921remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Input\Command\CommandDevice.cs (2)
109e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent || 279return Mouse.DirectlyOver;
System\Windows\Input\Mouse.cs (32)
20public static readonly RoutedEvent PreviewMouseMoveEvent = EventManager.RegisterRoutedEvent("PreviewMouseMove", RoutingStrategy.Tunnel, typeof(MouseEventHandler), typeof(Mouse)); 45public static readonly RoutedEvent MouseMoveEvent = EventManager.RegisterRoutedEvent("MouseMove", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 70public static readonly RoutedEvent PreviewMouseDownOutsideCapturedElementEvent = EventManager.RegisterRoutedEvent("PreviewMouseDownOutsideCapturedElement", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 95public static readonly RoutedEvent PreviewMouseUpOutsideCapturedElementEvent = EventManager.RegisterRoutedEvent("PreviewMouseUpOutsideCapturedElement", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 120public static readonly RoutedEvent PreviewMouseDownEvent = EventManager.RegisterRoutedEvent("PreviewMouseDown", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 145public static readonly RoutedEvent MouseDownEvent = EventManager.RegisterRoutedEvent("MouseDown", RoutingStrategy.Bubble, typeof(MouseButtonEventHandler), typeof(Mouse)); 170public static readonly RoutedEvent PreviewMouseUpEvent = EventManager.RegisterRoutedEvent("PreviewMouseUp", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 195public static readonly RoutedEvent MouseUpEvent = EventManager.RegisterRoutedEvent("MouseUp", RoutingStrategy.Bubble, typeof(MouseButtonEventHandler), typeof(Mouse)); 220public static readonly RoutedEvent PreviewMouseWheelEvent = EventManager.RegisterRoutedEvent("PreviewMouseWheel", RoutingStrategy.Tunnel, typeof(MouseWheelEventHandler), typeof(Mouse)); 245public static readonly RoutedEvent MouseWheelEvent = EventManager.RegisterRoutedEvent("MouseWheel", RoutingStrategy.Bubble, typeof(MouseWheelEventHandler), typeof(Mouse)); 270public static readonly RoutedEvent MouseEnterEvent = EventManager.RegisterRoutedEvent("MouseEnter", RoutingStrategy.Direct, typeof(MouseEventHandler), typeof(Mouse)); 295public static readonly RoutedEvent MouseLeaveEvent = EventManager.RegisterRoutedEvent("MouseLeave", RoutingStrategy.Direct, typeof(MouseEventHandler), typeof(Mouse)); 320public static readonly RoutedEvent GotMouseCaptureEvent = EventManager.RegisterRoutedEvent("GotMouseCapture", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 345public static readonly RoutedEvent LostMouseCaptureEvent = EventManager.RegisterRoutedEvent("LostMouseCapture", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 370public static readonly RoutedEvent QueryCursorEvent = EventManager.RegisterRoutedEvent("QueryCursor", RoutingStrategy.Bubble, typeof(QueryCursorEventHandler), typeof(Mouse)); 402return Mouse.PrimaryDevice.DirectlyOver; 413return Mouse.PrimaryDevice.Captured; 424return Mouse.PrimaryDevice.CapturedMode; 436return Mouse.PrimaryDevice.Capture(element); 450return Mouse.PrimaryDevice.Capture(element, captureMode); 465if(Mouse.PrimaryDevice.IsActive) 490return Mouse.PrimaryDevice.OverrideCursor; 496Mouse.PrimaryDevice.OverrideCursor = value; 507return Mouse.PrimaryDevice.SetCursor(cursor); 517return Mouse.PrimaryDevice.LeftButton; 528return Mouse.PrimaryDevice.RightButton; 539return Mouse.PrimaryDevice.MiddleButton; 550return Mouse.PrimaryDevice.XButton1; 561return Mouse.PrimaryDevice.XButton2; 571return Mouse.PrimaryDevice.GetPosition(relativeTo); 579Mouse.PrimaryDevice.Synchronize(); 587Mouse.PrimaryDevice.UpdateCursor();
System\Windows\Input\MouseDevice.cs (29)
937RoutedEvent = Mouse.QueryCursorEvent 1127RoutedEvent = Mouse.LostMouseCaptureEvent, 1137RoutedEvent = Mouse.GotMouseCaptureEvent, 1319if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1330RoutedEvent = Mouse.PreviewMouseDownOutsideCapturedElementEvent 1337else if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1348RoutedEvent = Mouse.PreviewMouseUpOutsideCapturedElementEvent 1789if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1823if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseWheelEvent) 1830RoutedEvent = Mouse.MouseWheelEvent 1844if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1852RoutedEvent = Mouse.MouseDownEvent 1859if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1866RoutedEvent = Mouse.MouseUpEvent 1873if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1880RoutedEvent = Mouse.MouseMoveEvent 1888if (e.StagingItem.Input.RoutedEvent == Mouse.QueryCursorEvent) 1928RoutedEvent = Mouse.PreviewMouseWheelEvent 1949RoutedEvent = Mouse.PreviewMouseDownEvent 1959RoutedEvent = Mouse.PreviewMouseUpEvent 1969RoutedEvent = Mouse.PreviewMouseDownEvent 1979RoutedEvent = Mouse.PreviewMouseUpEvent 1989RoutedEvent = Mouse.PreviewMouseDownEvent 1999RoutedEvent = Mouse.PreviewMouseUpEvent 2009RoutedEvent = Mouse.PreviewMouseDownEvent 2019RoutedEvent = Mouse.PreviewMouseUpEvent 2029RoutedEvent = Mouse.PreviewMouseDownEvent 2039RoutedEvent = Mouse.PreviewMouseUpEvent 2050RoutedEvent = Mouse.PreviewMouseMoveEvent
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
246Mouse.PrimaryDevice.LeftButton == MouseButtonState.Released;
System\Windows\Input\Stylus\Common\Stylus.cs (2)
748return Stylus.CurrentStylusDevice?.Captured ?? Mouse.Captured; 779return Mouse.Capture(element, captureMode);
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (4)
331if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 332e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 342stylus.Capture(Mouse.Captured, Mouse.CapturedMode);
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (3)
1097if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 1099Mouse.Capture(_stylusCapture, _captureMode);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (7)
493if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 494(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 495(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 547e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 550if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 556if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 563if (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); 1810if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 1811(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 1812(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 1864e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 1867if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1873if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1880if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
682if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 685Mouse.Capture(_stylusCapture, _captureMode);
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
811Mouse.UpdateCursor();
System\Windows\MouseOverProperty.cs (4)
47MouseEventArgs mouseEventArgs = new MouseEventArgs(Mouse.PrimaryDevice, Environment.TickCount, Mouse.PrimaryDevice.StylusDevice) 49RoutedEvent = oldValue ? Mouse.MouseLeaveEvent : Mouse.MouseEnterEvent
System\Windows\UIElement.cs (12)
2183if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2185else if(e.RoutedEvent == Mouse.MouseDownEvent) 2187else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2193if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2195else if(e.RoutedEvent == Mouse.MouseDownEvent) 2197else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2360return (Mouse.DirectlyOver == this); 2388Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 2393Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 2466return Mouse.Capture(this); 2474if (Mouse.Captured == this) 2476Mouse.Capture(null);
System\Windows\UIElement3D.cs (6)
339return (Mouse.DirectlyOver == this); 367Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 372Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 445return Mouse.Capture(this); 453if (Mouse.Captured == this) 455Mouse.Capture(null);
PresentationFramework (182)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
943Point currentPosition = Mouse.PrimaryDevice.GetPosition(textView.RenderScope);
MS\Internal\Documents\DocumentGridContextMenu.cs (1)
107uiScopeMouseDownPoint = Mouse.GetPosition(documentGrid);
MS\Internal\Ink\EditingCoordinator.cs (3)
421bool mouseDown = (_inkCanvas.IsMouseOver && Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed); 997_inkCanvas.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnInkCanvasDeviceMove<MouseEventArgs>)); 1035_inkCanvas.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnInkCanvasDeviceMove<MouseEventArgs>));
MS\Internal\Ink\SelectionEditingBehavior.cs (5)
60MouseDevice mouse = Mouse.PrimaryDevice; 79InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 80InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 91InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 92InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove));
MS\Internal\Ink\SelectionEditor.cs (10)
55Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 75InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 76InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 77InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 78InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent)); 80Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 90InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 91InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 92InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 93InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent));
System\Windows\Controls\ComboBox.cs (21)
48EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 49EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true); // call us even if the transparent button in the style gets the click. 50EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 51EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(OnPreviewMouseButtonDown)); 52EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseWheelEvent, new MouseWheelEventHandler(OnMouseWheel), true); // call us even if textbox in the style gets the click. 224Mouse.Capture(comboBox, CaptureMode.SubTree); 297Mouse.Capture(null); 1274if (IsDropDownOpen && Mouse.Captured == this && DidMouseMove()) 1682if (Mouse.Captured != comboBox) 1688if (Mouse.Captured == null || !MenuBase.IsDescendant(comboBox, Mouse.Captured as DependencyObject)) 1698if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 1700Mouse.Capture(comboBox, CaptureMode.SubTree); 1728if (Mouse.Captured == comboBox && e.OriginalSource == comboBox) 1731Debug.Assert(!comboBox.CheckAccess() || Mouse.Captured != comboBox, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1779Debug.Assert(!CheckAccess() || Mouse.Captured != this, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1807if (Mouse.LeftButton == MouseButtonState.Pressed && comboBox.HasMouseEnteredItemsHost) 1809if (Mouse.Captured == comboBox) 1811if (Mouse.LeftButton == MouseButtonState.Pressed) 1875if (Mouse.LeftButton == MouseButtonState.Pressed 1924return Mouse.Captured == this;
System\Windows\Controls\ContextMenu.cs (2)
521if (Mouse.LeftButton == MouseButtonState.Pressed) 525if (Mouse.RightButton == MouseButtonState.Pressed)
System\Windows\Controls\DataGrid.cs (11)
1741if (Mouse.LeftButton == MouseButtonState.Pressed) 4811if (Mouse.Capture(this, CaptureMode.SubTree)) 4814_dragPoint = Mouse.GetPosition(this); 4821if (Mouse.Captured == this) 6262Point currentMousePosition = Mouse.GetPosition(this); 6443Point pt = Mouse.GetPosition(row); 6563Point pt = Mouse.GetPosition(cell); 6573Point rowPt = Mouse.GetPosition(rowOwner); 6613UIElement element = Mouse.DirectlyOver as UIElement; 6634UIElement element = Mouse.DirectlyOver as UIElement; 6665Point pt = Mouse.GetPosition(itemsHost);
System\Windows\Controls\DataGridCell.cs (1)
939dataGridOwner.HandleSelectionForCellInput(this, /* startDragging = */ Mouse.Captured == null, /* allowsExtendSelect = */ true, /* allowsMinimalSelect = */ true);
System\Windows\Controls\DataGridTextColumn.cs (1)
186if ((mouseArgs == null) || !PlaceCaretOnTextBox(textBox, Mouse.GetPosition(textBox)))
System\Windows\Controls\GridViewColumnHeader.cs (2)
233(IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed))) 802Point pos = Mouse.PrimaryDevice.GetPosition(this);
System\Windows\Controls\InkCanvas.cs (4)
58EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, 64EventManager.RegisterClassHandler(ownerType, Mouse.MouseUpEvent, 69EventManager.RegisterClassHandler(ownerType, Mouse.QueryCursorEvent, 2908Mouse.UpdateCursor();
System\Windows\Controls\ItemsControl.cs (5)
3363Point mousePosition = Mouse.GetPosition(relativeTo); 3371NavigateByLine(startingInfo, FocusNavigationDirection.Up, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3376NavigateByLine(startingInfo, FocusNavigationDirection.Down, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3391NavigateByLine(startingInfo, direction, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3401NavigateByLine(startingInfo, direction, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers));
System\Windows\Controls\ListBox.cs (8)
73EventManager.RegisterClassHandler(typeof(ListBox), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseButtonUp), true); 549if (e.OriginalSource == this && Mouse.Captured == this) 551if (Mouse.LeftButton == MouseButtonState.Pressed) 700if (mouseButton == MouseButton.Left && Mouse.Captured != this) 702Mouse.Capture(this, CaptureMode.SubTree); 768if ((Mouse.Captured == this) && DidMouseMove()) 770NavigateToItem(ItemInfoFromContainer(listItem), new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 964if (Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\ListBoxItem.cs (1)
300if (parent != null && Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\Menu.cs (1)
331if (Mouse.Captured != null)
System\Windows\Controls\MenuItem.cs (6)
857if ((Mouse.LeftButton == MouseButtonState.Pressed) && 859itemBounds.Contains(Mouse.GetPosition(this))) 1548if (Mouse.Captured == null || Mouse.Captured is MenuBase) 2476if ((Mouse.Captured == elem) && (Mouse.DirectlyOver == elem))
System\Windows\Controls\PopupControlService.cs (12)
47if ((Mouse.LeftButton == MouseButtonState.Pressed) || 48(Mouse.RightButton == MouseButtonState.Pressed)) 54IInputElement directlyOver = Mouse.PrimaryDevice.RawDirectlyOver; 60if (Mouse.CapturedMode != CaptureMode.None) 68Point pt = Mouse.PrimaryDevice.GetPosition(rootAsUIElement); 114else if (e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent) 118else if (e.StagingItem.Input.RoutedEvent == Mouse.MouseDownEvent) 200IInputElement directlyOver = Mouse.PrimaryDevice.RawDirectlyOver; 203Point 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)
123if (IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) && !IsSpaceKeyDown) 149Point pos = Mouse.PrimaryDevice.GetPosition(this); 508((IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) && !IsSpaceKeyDown)))
System\Windows\Controls\Primitives\CalendarItem.cs (2)
671Mouse.Capture(this, CaptureMode.SubTree); 874Mouse.Capture(this, CaptureMode.SubTree);
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (1)
600Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
134dataGridOwner.HandleSelectionForRowHeaderAndDetailsInput(rowOwner, /* startDragging = */ Mouse.Captured == null);
System\Windows\Controls\Primitives\DataGridRowHeader.cs (1)
555if (Mouse.Captured == this)
System\Windows\Controls\Primitives\MenuBase.cs (16)
46EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown)); 47EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseButtonUp)); 48EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 51EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnPromotedMouseButton)); 52EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnPromotedMouseButton)); 54EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 55EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.PreviewMouseUpOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 535if (Mouse.Captured != menu) 541if (Mouse.Captured == null || !MenuBase.IsDescendant(menu, Mouse.Captured as DependencyObject)) 551if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 553Mouse.Capture(menu, CaptureMode.SubTree); 774return Mouse.Captured == this; 808if (!IsDescendant(this, Mouse.Captured as Visual) && !Mouse.Capture(this, CaptureMode.SubTree)) 865Mouse.Capture(null);
System\Windows\Controls\Primitives\Popup.cs (17)
49EventManager.RegisterClassHandler(typeof(Popup), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 1109Debug.Assert( Mouse.Captured == _popupRoot, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot"); 1140IInputElement capturedElement = Mouse.Captured; 1151if (Mouse.LeftButton != MouseButtonState.Released || 1152Mouse.RightButton != MouseButtonState.Released) 1174Mouse.Capture(_popupRoot, CaptureMode.SubTree); 1188if (Mouse.Captured == _popupRoot) 1192Mouse.Capture(null); 1232bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1241if(Mouse.Captured != root) 1246PopupRoot newRoot = Mouse.Captured as PopupRoot; 1251bool newCaptureInsidePopup = childPopupTookCapture || (Mouse.Captured != null && MenuBase.IsDescendant(root, Mouse.Captured as DependencyObject)); 1252bool newCaptureOutsidePopup = !newCaptureInsidePopup && Mouse.Captured != root; 1378e.RoutedEvent != Mouse.LostMouseCaptureEvent; 3032if (Mouse.DirectlyOver != null) 3045Point pt = Mouse.GetPosition(relativeTarget);
System\Windows\Controls\Primitives\Selector.cs (2)
1008_lastMousePosition = Mouse.GetPosition(this); 1015Point newPosition = Mouse.GetPosition(this);
System\Windows\Controls\Primitives\Thumb.cs (2)
44EventManager.RegisterClassHandler(typeof(Thumb), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 272if (Mouse.Captured != thumb)
System\Windows\Controls\Primitives\Track.cs (1)
802Mouse.Synchronize();
System\Windows\Controls\Slider.cs (1)
66EventManager.RegisterClassHandler(typeof(Slider), Mouse.MouseDownEvent, new MouseButtonEventHandler(Slider._OnMouseLeftButtonDown),true);
System\Windows\Controls\StickyNote.cs (2)
86EventManager.RegisterClassHandler(owner, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(_OnPreviewDeviceDown<MouseButtonEventArgs>)); 87EventManager.RegisterClassHandler(owner, Mouse.MouseDownEvent, new MouseButtonEventHandler(_OnDeviceDown<MouseButtonEventArgs>));
System\Windows\Controls\ToolBar.cs (5)
72EventManager.RegisterClassHandler(typeof(ToolBar), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true); 249Mouse.Capture(toolBar, CaptureMode.SubTree); 261if (Mouse.Captured == toolBar) 263Mouse.Capture(null); 574if (Mouse.Captured == null)
System\Windows\Controls\ToolBarTray.cs (1)
524Point pointRelativeToToolBarTray = Mouse.PrimaryDevice.GetPosition((IInputElement)this);
System\Windows\Controls\TreeViewItem.cs (1)
44EventManager.RegisterClassHandler(typeof(TreeViewItem), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true);
System\Windows\Controls\VirtualizingStackPanel.cs (1)
9422if ((Mouse.LeftButton == MouseButtonState.Pressed) &&
System\Windows\Documents\Hyperlink.cs (2)
46EventManager.RegisterClassHandler(typeof(Hyperlink), Mouse.QueryCursorEvent, new QueryCursorEventHandler(OnQueryCursor)); 988Mouse.Capture(element);
System\Windows\Documents\ImmComposition.cs (3)
1612if (Mouse.LeftButton == MouseButtonState.Pressed) 1616if (Mouse.RightButton == MouseButtonState.Pressed) 1621Point point = Mouse.GetPosition(RenderScope);
System\windows\Documents\TextEditorContextMenu.cs (3)
56Point renderScopeMouseDownPoint = Mouse.GetPosition(This.TextView.RenderScope); 106if (!TextEditorMouse.IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope))) 210Point uiScopeMouseDownPoint = Mouse.GetPosition(This.UiScope);
System\windows\Documents\TextEditorMouse.cs (6)
37EventManager.RegisterClassHandler(controlType, Mouse.QueryCursorEvent, new QueryCursorEventHandler(OnQueryCursor)); 39EventManager.RegisterClassHandler(controlType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDown)); 40EventManager.RegisterClassHandler(controlType, Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 41EventManager.RegisterClassHandler(controlType, Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 399if (IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope))) 709Mouse.UpdateCursor();
System\windows\Documents\TextEditorTyping.cs (4)
66EventManager.RegisterClassHandler(controlType, Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove), true /* handledEventsToo */); 67EventManager.RegisterClassHandler(controlType, Mouse.MouseLeaveEvent, new MouseEventHandler(OnMouseLeave), true /* handledEventsToo */); 1888TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false); 1894Mouse.UpdateCursor();
System\Windows\Documents\TextStore.cs (3)
2978if (Mouse.LeftButton == MouseButtonState.Pressed) 2982if (Mouse.RightButton == MouseButtonState.Pressed) 2995Point point = Mouse.GetPosition(RenderScope);
System\Windows\FrameworkContentElement.cs (3)
78EventManager.RegisterClassHandler(typeof(FrameworkContentElement), Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkContentElement.OnQueryCursor), true); 920Mouse.UpdateCursor(); 952Mouse.UpdateCursor();
System\Windows\FrameworkElement.cs (3)
2372EventManager.RegisterClassHandler(_typeofThis, Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkElement.OnQueryCursorOverride), true); 3877Mouse.UpdateCursor(); 3912Mouse.UpdateCursor();
System\Windows\Input\KeyboardNavigation.cs (2)
3241else if (inputEventArgs.RoutedEvent == Mouse.MouseDownEvent 3242|| inputEventArgs.RoutedEvent == Mouse.MouseUpEvent)
System\Windows\Window.cs (1)
245if (Mouse.LeftButton == MouseButtonState.Pressed)
System.Windows.Controls.Ribbon (40)
Microsoft\Windows\Controls\KeyTipService.cs (2)
696else if (routedEvent == Mouse.PreviewMouseDownEvent || 710else if (routedEvent == Mouse.PreviewMouseWheelEvent)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
98EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 99EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk)); 968if (!this.IsMinimized && (SelectedIndex >= 0) && (Mouse.Captured == this || Mouse.Captured == null))
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (2)
48EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 211if (Mouse.Captured == this &&
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
2654Debug.Assert(e.RoutedEvent == Mouse.MouseMoveEvent || e.RoutedEvent == Mouse.MouseLeaveEvent);
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (3)
74EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 75EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk), true /* handledEventsToo */); 77EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true);
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (17)
1029if (Mouse.Captured == null) 1045if (Mouse.Captured == null) 1047PresentationSource mouseSource = Mouse.PrimaryDevice.ActiveSource; 1073else if (!RibbonHelper.IsAncestorOf(targetCapture, Mouse.Captured as DependencyObject)) 1080if (Mouse.Captured == null) 1104bool success = Mouse.Capture(targetCapture, CaptureMode.SubTree); 1118Point position = Mouse.GetPosition(element); 1144UIElement source = Mouse.Captured as UIElement; 1202(Mouse.Captured == null || 1205Mouse.Capture(targetCapture, CaptureMode.SubTree); 1222Mouse.Captured != null && 1225Mouse.Capture(null); 1334return (Mouse.Captured == element || 1335RibbonHelper.IsAncestorOf(element, Mouse.Captured as DependencyObject)); 1340return (element != null && Mouse.Captured != null && (Mouse.Captured == element || 1341TreeHelper.IsVisualAncestorOf(element, Mouse.Captured as DependencyObject)));
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (4)
68EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 69EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true); 1115if (Mouse.Captured == this) 1121Mouse.Capture(null);
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (3)
67EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 768if ((Mouse.LeftButton == MouseButtonState.Pressed) && 770itemBounds.Contains(Mouse.GetPosition(this)))
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (3)
112EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 113EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk), true /* handledEventsToo */); 115EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true);