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)
52&& Mouse.LeftButton == MouseButtonState.Released)
PresentationCore (257)
MS\Internal\SynchronizedInputHelper.cs (4)
48re == Mouse.MouseDownEvent || 49re == Mouse.MouseUpEvent); 276e = new RoutedEvent[] {Mouse.MouseDownEvent}; 280e = new RoutedEvent[] {Mouse.MouseUpEvent};
System\Windows\ContentElement.cs (5)
255return (Mouse.DirectlyOver == this); 282Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 287Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 357return Mouse.Capture(this); 365Mouse.Capture(null);
System\Windows\Generated\ContentElement.cs (39)
804public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 811add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 812remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 823public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 830add { AddHandler(Mouse.MouseDownEvent, value, false); } 831remove { RemoveHandler(Mouse.MouseDownEvent, value); } 842public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 849add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 850remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 861public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 868add { AddHandler(Mouse.MouseUpEvent, value, false); } 869remove { RemoveHandler(Mouse.MouseUpEvent, value); } 1032public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 1039add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 1040remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 1051public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 1058add { AddHandler(Mouse.MouseMoveEvent, value, false); } 1059remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 1070public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 1077add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 1078remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 1089public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 1096add { AddHandler(Mouse.MouseWheelEvent, value, false); } 1097remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 1108public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 1115add { AddHandler(Mouse.MouseEnterEvent, value, false); } 1116remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 1127public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 1134add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 1135remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 1146public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 1153add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 1154remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 1165public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 1172add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 1173remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 1184public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 1191add { AddHandler(Mouse.QueryCursorEvent, value, false); } 1192remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement.cs (52)
724EventManager.RegisterClassHandler(type, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseDownThunk), true); 725EventManager.RegisterClassHandler(type, Mouse.MouseDownEvent, new MouseButtonEventHandler(UIElement.OnMouseDownThunk), true); 726EventManager.RegisterClassHandler(type, Mouse.PreviewMouseUpEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseUpThunk), true); 727EventManager.RegisterClassHandler(type, Mouse.MouseUpEvent, new MouseButtonEventHandler(UIElement.OnMouseUpThunk), true); 736EventManager.RegisterClassHandler(type, Mouse.PreviewMouseMoveEvent, new MouseEventHandler(UIElement.OnPreviewMouseMoveThunk), false); 737EventManager.RegisterClassHandler(type, Mouse.MouseMoveEvent, new MouseEventHandler(UIElement.OnMouseMoveThunk), false); 738EventManager.RegisterClassHandler(type, Mouse.PreviewMouseWheelEvent, new MouseWheelEventHandler(UIElement.OnPreviewMouseWheelThunk), false); 739EventManager.RegisterClassHandler(type, Mouse.MouseWheelEvent, new MouseWheelEventHandler(UIElement.OnMouseWheelThunk), false); 740EventManager.RegisterClassHandler(type, Mouse.MouseEnterEvent, new MouseEventHandler(UIElement.OnMouseEnterThunk), false); 741EventManager.RegisterClassHandler(type, Mouse.MouseLeaveEvent, new MouseEventHandler(UIElement.OnMouseLeaveThunk), false); 742EventManager.RegisterClassHandler(type, Mouse.GotMouseCaptureEvent, new MouseEventHandler(UIElement.OnGotMouseCaptureThunk), false); 743EventManager.RegisterClassHandler(type, Mouse.LostMouseCaptureEvent, new MouseEventHandler(UIElement.OnLostMouseCaptureThunk), false); 744EventManager.RegisterClassHandler(type, Mouse.QueryCursorEvent, new QueryCursorEventHandler(UIElement.OnQueryCursorThunk), false); 2757public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 2764add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 2765remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 2776public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 2783add { AddHandler(Mouse.MouseDownEvent, value, false); } 2784remove { RemoveHandler(Mouse.MouseDownEvent, value); } 2795public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 2802add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 2803remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 2814public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 2821add { AddHandler(Mouse.MouseUpEvent, value, false); } 2822remove { RemoveHandler(Mouse.MouseUpEvent, value); } 2985public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 2992add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 2993remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 3004public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 3011add { AddHandler(Mouse.MouseMoveEvent, value, false); } 3012remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 3023public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 3030add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 3031remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 3042public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 3049add { AddHandler(Mouse.MouseWheelEvent, value, false); } 3050remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 3061public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 3068add { AddHandler(Mouse.MouseEnterEvent, value, false); } 3069remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 3080public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 3087add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 3088remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 3099public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 3106add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 3107remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 3118public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 3125add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 3126remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 3137public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 3144add { AddHandler(Mouse.QueryCursorEvent, value, false); } 3145remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement3D.cs (39)
534public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 541add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 542remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 553public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 560add { AddHandler(Mouse.MouseDownEvent, value, false); } 561remove { RemoveHandler(Mouse.MouseDownEvent, value); } 572public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 579add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 580remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 591public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 598add { AddHandler(Mouse.MouseUpEvent, value, false); } 599remove { RemoveHandler(Mouse.MouseUpEvent, value); } 762public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 769add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 770remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 781public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 788add { AddHandler(Mouse.MouseMoveEvent, value, false); } 789remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 800public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 807add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 808remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 819public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 826add { AddHandler(Mouse.MouseWheelEvent, value, false); } 827remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 838public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 845add { AddHandler(Mouse.MouseEnterEvent, value, false); } 846remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 857public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 864add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 865remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 876public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 883add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 884remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 895public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 902add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 903remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 914public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 921add { AddHandler(Mouse.QueryCursorEvent, value, false); } 922remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Input\Command\CommandDevice.cs (2)
108e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent || 278return Mouse.DirectlyOver;
System\Windows\Input\Mouse.cs (32)
19public static readonly RoutedEvent PreviewMouseMoveEvent = EventManager.RegisterRoutedEvent("PreviewMouseMove", RoutingStrategy.Tunnel, typeof(MouseEventHandler), typeof(Mouse)); 44public static readonly RoutedEvent MouseMoveEvent = EventManager.RegisterRoutedEvent("MouseMove", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 69public static readonly RoutedEvent PreviewMouseDownOutsideCapturedElementEvent = EventManager.RegisterRoutedEvent("PreviewMouseDownOutsideCapturedElement", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 94public static readonly RoutedEvent PreviewMouseUpOutsideCapturedElementEvent = EventManager.RegisterRoutedEvent("PreviewMouseUpOutsideCapturedElement", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 119public static readonly RoutedEvent PreviewMouseDownEvent = EventManager.RegisterRoutedEvent("PreviewMouseDown", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 144public static readonly RoutedEvent MouseDownEvent = EventManager.RegisterRoutedEvent("MouseDown", RoutingStrategy.Bubble, typeof(MouseButtonEventHandler), typeof(Mouse)); 169public static readonly RoutedEvent PreviewMouseUpEvent = EventManager.RegisterRoutedEvent("PreviewMouseUp", RoutingStrategy.Tunnel, typeof(MouseButtonEventHandler), typeof(Mouse)); 194public static readonly RoutedEvent MouseUpEvent = EventManager.RegisterRoutedEvent("MouseUp", RoutingStrategy.Bubble, typeof(MouseButtonEventHandler), typeof(Mouse)); 219public static readonly RoutedEvent PreviewMouseWheelEvent = EventManager.RegisterRoutedEvent("PreviewMouseWheel", RoutingStrategy.Tunnel, typeof(MouseWheelEventHandler), typeof(Mouse)); 244public static readonly RoutedEvent MouseWheelEvent = EventManager.RegisterRoutedEvent("MouseWheel", RoutingStrategy.Bubble, typeof(MouseWheelEventHandler), typeof(Mouse)); 269public static readonly RoutedEvent MouseEnterEvent = EventManager.RegisterRoutedEvent("MouseEnter", RoutingStrategy.Direct, typeof(MouseEventHandler), typeof(Mouse)); 294public static readonly RoutedEvent MouseLeaveEvent = EventManager.RegisterRoutedEvent("MouseLeave", RoutingStrategy.Direct, typeof(MouseEventHandler), typeof(Mouse)); 319public static readonly RoutedEvent GotMouseCaptureEvent = EventManager.RegisterRoutedEvent("GotMouseCapture", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 344public static readonly RoutedEvent LostMouseCaptureEvent = EventManager.RegisterRoutedEvent("LostMouseCapture", RoutingStrategy.Bubble, typeof(MouseEventHandler), typeof(Mouse)); 369public static readonly RoutedEvent QueryCursorEvent = EventManager.RegisterRoutedEvent("QueryCursor", RoutingStrategy.Bubble, typeof(QueryCursorEventHandler), typeof(Mouse)); 401return Mouse.PrimaryDevice.DirectlyOver; 412return Mouse.PrimaryDevice.Captured; 423return Mouse.PrimaryDevice.CapturedMode; 435return Mouse.PrimaryDevice.Capture(element); 449return Mouse.PrimaryDevice.Capture(element, captureMode); 464if(Mouse.PrimaryDevice.IsActive) 489return Mouse.PrimaryDevice.OverrideCursor; 495Mouse.PrimaryDevice.OverrideCursor = value; 506return Mouse.PrimaryDevice.SetCursor(cursor); 516return Mouse.PrimaryDevice.LeftButton; 527return Mouse.PrimaryDevice.RightButton; 538return Mouse.PrimaryDevice.MiddleButton; 549return Mouse.PrimaryDevice.XButton1; 560return Mouse.PrimaryDevice.XButton2; 570return Mouse.PrimaryDevice.GetPosition(relativeTo); 578Mouse.PrimaryDevice.Synchronize(); 586Mouse.PrimaryDevice.UpdateCursor();
System\Windows\Input\MouseDevice.cs (29)
936RoutedEvent = Mouse.QueryCursorEvent 1126RoutedEvent = Mouse.LostMouseCaptureEvent, 1136RoutedEvent = Mouse.GotMouseCaptureEvent, 1318if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1329RoutedEvent = Mouse.PreviewMouseDownOutsideCapturedElementEvent 1336else if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1347RoutedEvent = Mouse.PreviewMouseUpOutsideCapturedElementEvent 1785if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1819if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseWheelEvent) 1826RoutedEvent = Mouse.MouseWheelEvent 1840if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1848RoutedEvent = Mouse.MouseDownEvent 1855if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1862RoutedEvent = Mouse.MouseUpEvent 1869if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1876RoutedEvent = Mouse.MouseMoveEvent 1884if (e.StagingItem.Input.RoutedEvent == Mouse.QueryCursorEvent) 1924RoutedEvent = Mouse.PreviewMouseWheelEvent 1945RoutedEvent = Mouse.PreviewMouseDownEvent 1955RoutedEvent = Mouse.PreviewMouseUpEvent 1965RoutedEvent = Mouse.PreviewMouseDownEvent 1975RoutedEvent = Mouse.PreviewMouseUpEvent 1985RoutedEvent = Mouse.PreviewMouseDownEvent 1995RoutedEvent = Mouse.PreviewMouseUpEvent 2005RoutedEvent = Mouse.PreviewMouseDownEvent 2015RoutedEvent = Mouse.PreviewMouseUpEvent 2025RoutedEvent = Mouse.PreviewMouseDownEvent 2035RoutedEvent = Mouse.PreviewMouseUpEvent 2046RoutedEvent = Mouse.PreviewMouseMoveEvent
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
245Mouse.PrimaryDevice.LeftButton == MouseButtonState.Released;
System\Windows\Input\Stylus\Common\Stylus.cs (2)
747return Stylus.CurrentStylusDevice?.Captured ?? Mouse.Captured; 778return Mouse.Capture(element, captureMode);
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (4)
330if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 331e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 341stylus.Capture(Mouse.Captured, Mouse.CapturedMode);
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (3)
1096if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 1098Mouse.Capture(_stylusCapture, _captureMode);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (7)
492if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 493(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 494(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 546e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 549if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 555if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 562if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent)
System\Windows\Input\Stylus\Wisp\WispLogic.cs (12)
709if (!stylusIsDown && Mouse.Captured != null && !InWindowClientRect(ptMouse, mouseInputReport.InputSource)) 1148if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 1149e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 1167stylusDevice.Capture(Mouse.Captured, Mouse.CapturedMode); 1809if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 1810(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 1811(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 1863e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 1866if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1872if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1879if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
678if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 681Mouse.Capture(_stylusCapture, _captureMode);
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
807Mouse.UpdateCursor();
System\Windows\MouseOverProperty.cs (4)
46MouseEventArgs mouseEventArgs = new MouseEventArgs(Mouse.PrimaryDevice, Environment.TickCount, Mouse.PrimaryDevice.StylusDevice) 48RoutedEvent = oldValue ? Mouse.MouseLeaveEvent : Mouse.MouseEnterEvent
System\Windows\UIElement.cs (12)
2182if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2184else if(e.RoutedEvent == Mouse.MouseDownEvent) 2186else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2192if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2194else if(e.RoutedEvent == Mouse.MouseDownEvent) 2196else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2359return (Mouse.DirectlyOver == this); 2387Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 2392Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 2465return Mouse.Capture(this); 2473if (Mouse.Captured == this) 2475Mouse.Capture(null);
System\Windows\UIElement3D.cs (6)
338return (Mouse.DirectlyOver == this); 366Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 371Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 444return Mouse.Capture(this); 452if (Mouse.Captured == this) 454Mouse.Capture(null);
PresentationFramework (182)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
940Point currentPosition = Mouse.PrimaryDevice.GetPosition(textView.RenderScope);
MS\Internal\Documents\DocumentGridContextMenu.cs (1)
106uiScopeMouseDownPoint = Mouse.GetPosition(documentGrid);
MS\Internal\Ink\EditingCoordinator.cs (3)
420bool mouseDown = (_inkCanvas.IsMouseOver && Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed); 987_inkCanvas.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnInkCanvasDeviceMove<MouseEventArgs>)); 1025_inkCanvas.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnInkCanvasDeviceMove<MouseEventArgs>));
MS\Internal\Ink\SelectionEditingBehavior.cs (5)
59MouseDevice mouse = Mouse.PrimaryDevice; 78InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 79InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 90InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 91InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove));
MS\Internal\Ink\SelectionEditor.cs (10)
54Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 74InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 75InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 76InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 77InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent)); 79Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 89InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 90InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 91InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 92InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent));
System\Windows\Controls\ComboBox.cs (21)
47EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 48EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true); // call us even if the transparent button in the style gets the click. 49EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 50EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(OnPreviewMouseButtonDown)); 51EventManager.RegisterClassHandler(typeof(ComboBox), Mouse.MouseWheelEvent, new MouseWheelEventHandler(OnMouseWheel), true); // call us even if textbox in the style gets the click. 220Mouse.Capture(comboBox, CaptureMode.SubTree); 290Mouse.Capture(null); 1265if (IsDropDownOpen && Mouse.Captured == this && DidMouseMove()) 1673if (Mouse.Captured != comboBox) 1679if (Mouse.Captured == null || !MenuBase.IsDescendant(comboBox, Mouse.Captured as DependencyObject)) 1689if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 1691Mouse.Capture(comboBox, CaptureMode.SubTree); 1719if (Mouse.Captured == comboBox && e.OriginalSource == comboBox) 1722Debug.Assert(!comboBox.CheckAccess() || Mouse.Captured != comboBox, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1770Debug.Assert(!CheckAccess() || Mouse.Captured != this, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1798if (Mouse.LeftButton == MouseButtonState.Pressed && comboBox.HasMouseEnteredItemsHost) 1800if (Mouse.Captured == comboBox) 1802if (Mouse.LeftButton == MouseButtonState.Pressed) 1866if (Mouse.LeftButton == MouseButtonState.Pressed 1915return Mouse.Captured == this;
System\Windows\Controls\ContextMenu.cs (2)
520if (Mouse.LeftButton == MouseButtonState.Pressed) 524if (Mouse.RightButton == MouseButtonState.Pressed)
System\Windows\Controls\DataGrid.cs (11)
1731if (Mouse.LeftButton == MouseButtonState.Pressed) 4771if (Mouse.Capture(this, CaptureMode.SubTree)) 4774_dragPoint = Mouse.GetPosition(this); 4781if (Mouse.Captured == this) 6216Point currentMousePosition = Mouse.GetPosition(this); 6397Point pt = Mouse.GetPosition(row); 6517Point pt = Mouse.GetPosition(cell); 6527Point rowPt = Mouse.GetPosition(rowOwner); 6567UIElement element = Mouse.DirectlyOver as UIElement; 6588UIElement element = Mouse.DirectlyOver as UIElement; 6619Point pt = Mouse.GetPosition(itemsHost);
System\Windows\Controls\DataGridCell.cs (1)
924dataGridOwner?.HandleSelectionForCellInput(this, /* startDragging = */ Mouse.Captured == null, /* allowsExtendSelect = */ true, /* allowsMinimalSelect = */ true);
System\Windows\Controls\DataGridTextColumn.cs (1)
185if ((mouseArgs == null) || !PlaceCaretOnTextBox(textBox, Mouse.GetPosition(textBox)))
System\Windows\Controls\GridViewColumnHeader.cs (2)
232(IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed))) 792Point pos = Mouse.PrimaryDevice.GetPosition(this);
System\Windows\Controls\InkCanvas.cs (4)
57EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, 63EventManager.RegisterClassHandler(ownerType, Mouse.MouseUpEvent, 68EventManager.RegisterClassHandler(ownerType, Mouse.QueryCursorEvent, 2907Mouse.UpdateCursor();
System\Windows\Controls\ItemsControl.cs (5)
3332Point mousePosition = Mouse.GetPosition(relativeTo); 3340NavigateByLine(startingInfo, FocusNavigationDirection.Up, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3345NavigateByLine(startingInfo, FocusNavigationDirection.Down, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3360NavigateByLine(startingInfo, direction, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 3370NavigateByLine(startingInfo, direction, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers));
System\Windows\Controls\ListBox.cs (8)
72EventManager.RegisterClassHandler(typeof(ListBox), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseButtonUp), true); 547if (e.OriginalSource == this && Mouse.Captured == this) 549if (Mouse.LeftButton == MouseButtonState.Pressed) 698if (mouseButton == MouseButton.Left && Mouse.Captured != this) 700Mouse.Capture(this, CaptureMode.SubTree); 766if ((Mouse.Captured == this) && DidMouseMove()) 768NavigateToItem(ItemInfoFromContainer(listItem), new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers)); 959if (Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\ListBoxItem.cs (1)
293if (parent != null && Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\Menu.cs (1)
330if (Mouse.Captured != null)
System\Windows\Controls\MenuItem.cs (6)
856if ((Mouse.LeftButton == MouseButtonState.Pressed) && 858itemBounds.Contains(Mouse.GetPosition(this))) 1543if (Mouse.Captured == null || Mouse.Captured is MenuBase) 2468if ((Mouse.Captured == elem) && (Mouse.DirectlyOver == elem))
System\Windows\Controls\PopupControlService.cs (12)
46if ((Mouse.LeftButton == MouseButtonState.Pressed) || 47(Mouse.RightButton == MouseButtonState.Pressed)) 53IInputElement directlyOver = Mouse.PrimaryDevice.RawDirectlyOver; 59if (Mouse.CapturedMode != CaptureMode.None) 67Point pt = Mouse.PrimaryDevice.GetPosition(rootAsUIElement); 113else if (e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent) 117else if (e.StagingItem.Input.RoutedEvent == Mouse.MouseDownEvent) 199IInputElement directlyOver = Mouse.PrimaryDevice.RawDirectlyOver; 202Point pt = Mouse.PrimaryDevice.GetPosition(directlyOver); 1589PresentationSource mouseSource = Mouse.PrimaryDevice.CriticalActiveSource; 1590System.Windows.Point pt = Mouse.PrimaryDevice.NonRelativePosition; 1610System.Windows.Point pt2 = hwndSource.TransformToDevice(Mouse.PrimaryDevice.GetPosition(rootElement));
System\Windows\Controls\Primitives\ButtonBase.cs (3)
122if (IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) && !IsSpaceKeyDown) 148Point pos = Mouse.PrimaryDevice.GetPosition(this); 507((IsMouseCaptured && (Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) && !IsSpaceKeyDown)))
System\Windows\Controls\Primitives\CalendarItem.cs (2)
670Mouse.Capture(this, CaptureMode.SubTree); 873Mouse.Capture(this, CaptureMode.SubTree);
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (1)
593Mouse.LeftButton == MouseButtonState.Pressed)
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
133dataGridOwner.HandleSelectionForRowHeaderAndDetailsInput(rowOwner, /* startDragging = */ Mouse.Captured == null);
System\Windows\Controls\Primitives\DataGridRowHeader.cs (1)
554if (Mouse.Captured == this)
System\Windows\Controls\Primitives\MenuBase.cs (16)
45EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown)); 46EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseButtonUp)); 47EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 50EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnPromotedMouseButton)); 51EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.MouseUpEvent, new MouseButtonEventHandler(OnPromotedMouseButton)); 53EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 54EventManager.RegisterClassHandler(typeof(MenuBase), Mouse.PreviewMouseUpOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 534if (Mouse.Captured != menu) 540if (Mouse.Captured == null || !MenuBase.IsDescendant(menu, Mouse.Captured as DependencyObject)) 550if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 552Mouse.Capture(menu, CaptureMode.SubTree); 773return Mouse.Captured == this; 807if (!IsDescendant(this, Mouse.Captured as Visual) && !Mouse.Capture(this, CaptureMode.SubTree)) 864Mouse.Capture(null);
System\Windows\Controls\Primitives\Popup.cs (17)
48EventManager.RegisterClassHandler(typeof(Popup), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 1108Debug.Assert( Mouse.Captured == _popupRoot, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot"); 1139IInputElement capturedElement = Mouse.Captured; 1150if (Mouse.LeftButton != MouseButtonState.Released || 1151Mouse.RightButton != MouseButtonState.Released) 1173Mouse.Capture(_popupRoot, CaptureMode.SubTree); 1187if (Mouse.Captured == _popupRoot) 1191Mouse.Capture(null); 1228bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1237if(Mouse.Captured != root) 1242PopupRoot newRoot = Mouse.Captured as PopupRoot; 1247bool newCaptureInsidePopup = childPopupTookCapture || (Mouse.Captured != null && MenuBase.IsDescendant(root, Mouse.Captured as DependencyObject)); 1248bool newCaptureOutsidePopup = !newCaptureInsidePopup && Mouse.Captured != root; 1374e.RoutedEvent != Mouse.LostMouseCaptureEvent; 3028if (Mouse.DirectlyOver != null) 3041Point pt = Mouse.GetPosition(relativeTarget);
System\Windows\Controls\Primitives\Selector.cs (2)
1006_lastMousePosition = Mouse.GetPosition(this); 1013Point newPosition = Mouse.GetPosition(this);
System\Windows\Controls\Primitives\Thumb.cs (2)
43EventManager.RegisterClassHandler(typeof(Thumb), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 271if (Mouse.Captured != thumb)
System\Windows\Controls\Primitives\Track.cs (1)
787Mouse.Synchronize();
System\Windows\Controls\Slider.cs (1)
65EventManager.RegisterClassHandler(typeof(Slider), Mouse.MouseDownEvent, new MouseButtonEventHandler(Slider._OnMouseLeftButtonDown),true);
System\Windows\Controls\StickyNote.cs (2)
85EventManager.RegisterClassHandler(owner, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(_OnPreviewDeviceDown<MouseButtonEventArgs>)); 86EventManager.RegisterClassHandler(owner, Mouse.MouseDownEvent, new MouseButtonEventHandler(_OnDeviceDown<MouseButtonEventArgs>));
System\Windows\Controls\ToolBar.cs (5)
71EventManager.RegisterClassHandler(typeof(ToolBar), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true); 248Mouse.Capture(toolBar, CaptureMode.SubTree); 260if (Mouse.Captured == toolBar) 262Mouse.Capture(null); 567if (Mouse.Captured == null)
System\Windows\Controls\ToolBarTray.cs (1)
523Point pointRelativeToToolBarTray = Mouse.PrimaryDevice.GetPosition((IInputElement)this);
System\Windows\Controls\TreeViewItem.cs (1)
43EventManager.RegisterClassHandler(typeof(TreeViewItem), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseButtonDown), true);
System\Windows\Controls\VirtualizingStackPanel.cs (1)
9400if ((Mouse.LeftButton == MouseButtonState.Pressed) &&
System\Windows\Documents\Hyperlink.cs (2)
45EventManager.RegisterClassHandler(typeof(Hyperlink), Mouse.QueryCursorEvent, new QueryCursorEventHandler(OnQueryCursor)); 987Mouse.Capture(element);
System\Windows\Documents\ImmComposition.cs (3)
1611if (Mouse.LeftButton == MouseButtonState.Pressed) 1615if (Mouse.RightButton == MouseButtonState.Pressed) 1620Point point = Mouse.GetPosition(RenderScope);
System\windows\Documents\TextEditorContextMenu.cs (3)
55Point renderScopeMouseDownPoint = Mouse.GetPosition(This.TextView.RenderScope); 105if (!TextEditorMouse.IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope))) 209Point uiScopeMouseDownPoint = Mouse.GetPosition(This.UiScope);
System\windows\Documents\TextEditorMouse.cs (6)
36EventManager.RegisterClassHandler(controlType, Mouse.QueryCursorEvent, new QueryCursorEventHandler(OnQueryCursor)); 38EventManager.RegisterClassHandler(controlType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDown)); 39EventManager.RegisterClassHandler(controlType, Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 40EventManager.RegisterClassHandler(controlType, Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 395if (IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope))) 705Mouse.UpdateCursor();
System\windows\Documents\TextEditorTyping.cs (4)
65EventManager.RegisterClassHandler(controlType, Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove), true /* handledEventsToo */); 66EventManager.RegisterClassHandler(controlType, Mouse.MouseLeaveEvent, new MouseEventHandler(OnMouseLeave), true /* handledEventsToo */); 1875TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false); 1881Mouse.UpdateCursor();
System\Windows\Documents\TextStore.cs (3)
2971if (Mouse.LeftButton == MouseButtonState.Pressed) 2975if (Mouse.RightButton == MouseButtonState.Pressed) 2988Point point = Mouse.GetPosition(RenderScope);
System\Windows\FrameworkContentElement.cs (3)
77EventManager.RegisterClassHandler(typeof(FrameworkContentElement), Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkContentElement.OnQueryCursor), true); 916Mouse.UpdateCursor(); 948Mouse.UpdateCursor();
System\Windows\FrameworkElement.cs (3)
2368EventManager.RegisterClassHandler(_typeofThis, Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkElement.OnQueryCursorOverride), true); 3870Mouse.UpdateCursor(); 3905Mouse.UpdateCursor();
System\Windows\Input\KeyboardNavigation.cs (2)
3229else if (inputEventArgs.RoutedEvent == Mouse.MouseDownEvent 3230|| inputEventArgs.RoutedEvent == Mouse.MouseUpEvent)
System\Windows\Window.cs (1)
244if (Mouse.LeftButton == MouseButtonState.Pressed)
System.Windows.Controls.Ribbon (40)
Microsoft\Windows\Controls\KeyTipService.cs (2)
692else if (routedEvent == Mouse.PreviewMouseDownEvent || 706else if (routedEvent == Mouse.PreviewMouseWheelEvent)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
97EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 98EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk)); 967if (!this.IsMinimized && (SelectedIndex >= 0) && (Mouse.Captured == this || Mouse.Captured == null))
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (2)
47EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 210if (Mouse.Captured == this &&
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
2650Debug.Assert(e.RoutedEvent == Mouse.MouseMoveEvent || e.RoutedEvent == Mouse.MouseLeaveEvent);
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (3)
73EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 74EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk), true /* handledEventsToo */); 76EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true);
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (17)
1022if (Mouse.Captured == null) 1038if (Mouse.Captured == null) 1040PresentationSource mouseSource = Mouse.PrimaryDevice.ActiveSource; 1066else if (!RibbonHelper.IsAncestorOf(targetCapture, Mouse.Captured as DependencyObject)) 1073if (Mouse.Captured == null) 1097bool success = Mouse.Capture(targetCapture, CaptureMode.SubTree); 1111Point position = Mouse.GetPosition(element); 1137UIElement source = Mouse.Captured as UIElement; 1192(Mouse.Captured == null || 1195Mouse.Capture(targetCapture, CaptureMode.SubTree); 1212Mouse.Captured != null && 1215Mouse.Capture(null); 1315return (Mouse.Captured == element || 1316RibbonHelper.IsAncestorOf(element, Mouse.Captured as DependencyObject)); 1321return (element != null && Mouse.Captured != null && (Mouse.Captured == element || 1322TreeHelper.IsVisualAncestorOf(element, Mouse.Captured as DependencyObject)));
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (4)
67EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 68EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true); 1111if (Mouse.Captured == this) 1117Mouse.Capture(null);
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (3)
66EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 764if ((Mouse.LeftButton == MouseButtonState.Pressed) && 766itemBounds.Contains(Mouse.GetPosition(this)))
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (3)
111EventManager.RegisterClassHandler(ownerType, Mouse.PreviewMouseDownOutsideCapturedElementEvent, new MouseButtonEventHandler(OnClickThroughThunk)); 112EventManager.RegisterClassHandler(ownerType, Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCaptureThunk), true /* handledEventsToo */); 114EventManager.RegisterClassHandler(ownerType, Mouse.MouseDownEvent, new MouseButtonEventHandler(OnMouseDownThunk), true);