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)
816public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 823add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 824remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 835public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 842add { AddHandler(Mouse.MouseDownEvent, value, false); } 843remove { RemoveHandler(Mouse.MouseDownEvent, value); } 854public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 861add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 862remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 873public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 880add { AddHandler(Mouse.MouseUpEvent, value, false); } 881remove { RemoveHandler(Mouse.MouseUpEvent, value); } 1044public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 1051add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 1052remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 1063public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 1070add { AddHandler(Mouse.MouseMoveEvent, value, false); } 1071remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 1082public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 1089add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 1090remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 1101public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 1108add { AddHandler(Mouse.MouseWheelEvent, value, false); } 1109remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 1120public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 1127add { AddHandler(Mouse.MouseEnterEvent, value, false); } 1128remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 1139public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 1146add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 1147remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 1158public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 1165add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 1166remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 1177public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 1184add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 1185remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 1196public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 1203add { AddHandler(Mouse.QueryCursorEvent, value, false); } 1204remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement.cs (52)
736EventManager.RegisterClassHandler(type, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseDownThunk), true); 737EventManager.RegisterClassHandler(type, Mouse.MouseDownEvent, new MouseButtonEventHandler(UIElement.OnMouseDownThunk), true); 738EventManager.RegisterClassHandler(type, Mouse.PreviewMouseUpEvent, new MouseButtonEventHandler(UIElement.OnPreviewMouseUpThunk), true); 739EventManager.RegisterClassHandler(type, Mouse.MouseUpEvent, new MouseButtonEventHandler(UIElement.OnMouseUpThunk), true); 748EventManager.RegisterClassHandler(type, Mouse.PreviewMouseMoveEvent, new MouseEventHandler(UIElement.OnPreviewMouseMoveThunk), false); 749EventManager.RegisterClassHandler(type, Mouse.MouseMoveEvent, new MouseEventHandler(UIElement.OnMouseMoveThunk), false); 750EventManager.RegisterClassHandler(type, Mouse.PreviewMouseWheelEvent, new MouseWheelEventHandler(UIElement.OnPreviewMouseWheelThunk), false); 751EventManager.RegisterClassHandler(type, Mouse.MouseWheelEvent, new MouseWheelEventHandler(UIElement.OnMouseWheelThunk), false); 752EventManager.RegisterClassHandler(type, Mouse.MouseEnterEvent, new MouseEventHandler(UIElement.OnMouseEnterThunk), false); 753EventManager.RegisterClassHandler(type, Mouse.MouseLeaveEvent, new MouseEventHandler(UIElement.OnMouseLeaveThunk), false); 754EventManager.RegisterClassHandler(type, Mouse.GotMouseCaptureEvent, new MouseEventHandler(UIElement.OnGotMouseCaptureThunk), false); 755EventManager.RegisterClassHandler(type, Mouse.LostMouseCaptureEvent, new MouseEventHandler(UIElement.OnLostMouseCaptureThunk), false); 756EventManager.RegisterClassHandler(type, Mouse.QueryCursorEvent, new QueryCursorEventHandler(UIElement.OnQueryCursorThunk), false); 2769public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 2776add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 2777remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 2788public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 2795add { AddHandler(Mouse.MouseDownEvent, value, false); } 2796remove { RemoveHandler(Mouse.MouseDownEvent, value); } 2807public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 2814add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 2815remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 2826public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 2833add { AddHandler(Mouse.MouseUpEvent, value, false); } 2834remove { RemoveHandler(Mouse.MouseUpEvent, value); } 2997public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 3004add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 3005remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 3016public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 3023add { AddHandler(Mouse.MouseMoveEvent, value, false); } 3024remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 3035public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 3042add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 3043remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 3054public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 3061add { AddHandler(Mouse.MouseWheelEvent, value, false); } 3062remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 3073public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 3080add { AddHandler(Mouse.MouseEnterEvent, value, false); } 3081remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 3092public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 3099add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 3100remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 3111public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 3118add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 3119remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 3130public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 3137add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 3138remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 3149public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 3156add { AddHandler(Mouse.QueryCursorEvent, value, false); } 3157remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Generated\UIElement3D.cs (39)
535public static readonly RoutedEvent PreviewMouseDownEvent = Mouse.PreviewMouseDownEvent.AddOwner(_typeofThis); 542add { AddHandler(Mouse.PreviewMouseDownEvent, value, false); } 543remove { RemoveHandler(Mouse.PreviewMouseDownEvent, value); } 554public static readonly RoutedEvent MouseDownEvent = Mouse.MouseDownEvent.AddOwner(_typeofThis); 561add { AddHandler(Mouse.MouseDownEvent, value, false); } 562remove { RemoveHandler(Mouse.MouseDownEvent, value); } 573public static readonly RoutedEvent PreviewMouseUpEvent = Mouse.PreviewMouseUpEvent.AddOwner(_typeofThis); 580add { AddHandler(Mouse.PreviewMouseUpEvent, value, false); } 581remove { RemoveHandler(Mouse.PreviewMouseUpEvent, value); } 592public static readonly RoutedEvent MouseUpEvent = Mouse.MouseUpEvent.AddOwner(_typeofThis); 599add { AddHandler(Mouse.MouseUpEvent, value, false); } 600remove { RemoveHandler(Mouse.MouseUpEvent, value); } 763public static readonly RoutedEvent PreviewMouseMoveEvent = Mouse.PreviewMouseMoveEvent.AddOwner(_typeofThis); 770add { AddHandler(Mouse.PreviewMouseMoveEvent, value, false); } 771remove { RemoveHandler(Mouse.PreviewMouseMoveEvent, value); } 782public static readonly RoutedEvent MouseMoveEvent = Mouse.MouseMoveEvent.AddOwner(_typeofThis); 789add { AddHandler(Mouse.MouseMoveEvent, value, false); } 790remove { RemoveHandler(Mouse.MouseMoveEvent, value); } 801public static readonly RoutedEvent PreviewMouseWheelEvent = Mouse.PreviewMouseWheelEvent.AddOwner(_typeofThis); 808add { AddHandler(Mouse.PreviewMouseWheelEvent, value, false); } 809remove { RemoveHandler(Mouse.PreviewMouseWheelEvent, value); } 820public static readonly RoutedEvent MouseWheelEvent = Mouse.MouseWheelEvent.AddOwner(_typeofThis); 827add { AddHandler(Mouse.MouseWheelEvent, value, false); } 828remove { RemoveHandler(Mouse.MouseWheelEvent, value); } 839public static readonly RoutedEvent MouseEnterEvent = Mouse.MouseEnterEvent.AddOwner(_typeofThis); 846add { AddHandler(Mouse.MouseEnterEvent, value, false); } 847remove { RemoveHandler(Mouse.MouseEnterEvent, value); } 858public static readonly RoutedEvent MouseLeaveEvent = Mouse.MouseLeaveEvent.AddOwner(_typeofThis); 865add { AddHandler(Mouse.MouseLeaveEvent, value, false); } 866remove { RemoveHandler(Mouse.MouseLeaveEvent, value); } 877public static readonly RoutedEvent GotMouseCaptureEvent = Mouse.GotMouseCaptureEvent.AddOwner(_typeofThis); 884add { AddHandler(Mouse.GotMouseCaptureEvent, value, false); } 885remove { RemoveHandler(Mouse.GotMouseCaptureEvent, value); } 896public static readonly RoutedEvent LostMouseCaptureEvent = Mouse.LostMouseCaptureEvent.AddOwner(_typeofThis); 903add { AddHandler(Mouse.LostMouseCaptureEvent, value, false); } 904remove { RemoveHandler(Mouse.LostMouseCaptureEvent, value); } 915public static readonly RoutedEvent QueryCursorEvent = Mouse.QueryCursorEvent.AddOwner(_typeofThis); 922add { AddHandler(Mouse.QueryCursorEvent, value, false); } 923remove { RemoveHandler(Mouse.QueryCursorEvent, value); }
System\Windows\Input\Command\CommandDevice.cs (2)
107e.StagingItem.Input.RoutedEvent == Mouse.MouseUpEvent || 277return 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)
939queryCursor.RoutedEvent=Mouse.QueryCursorEvent; 1127lostCapture.RoutedEvent=Mouse.LostMouseCaptureEvent; 1135gotCapture.RoutedEvent=Mouse.GotMouseCaptureEvent; 1310if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1320clickThrough.RoutedEvent=Mouse.PreviewMouseDownOutsideCapturedElementEvent; 1326else if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1336clickThrough.RoutedEvent=Mouse.PreviewMouseUpOutsideCapturedElementEvent; 1774if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1808if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseWheelEvent) 1814wheel.RoutedEvent=Mouse.MouseWheelEvent; 1827if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1834down.RoutedEvent=Mouse.MouseDownEvent; 1840if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent) 1846up.RoutedEvent=Mouse.MouseUpEvent; 1852if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1858move.RoutedEvent=Mouse.MouseMoveEvent; 1865if (e.StagingItem.Input.RoutedEvent == Mouse.QueryCursorEvent) 1905previewWheel.RoutedEvent=Mouse.PreviewMouseWheelEvent; 1925previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1934previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1943previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1952previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1961previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1970previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1979previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 1988previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 1997previewDown.RoutedEvent=Mouse.PreviewMouseDownEvent; 2006previewUp.RoutedEvent=Mouse.PreviewMouseUpEvent; 2016previewMove.RoutedEvent=Mouse.PreviewMouseMoveEvent;
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
244Mouse.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)
329if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 330e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 340stylus.Capture(Mouse.Captured, Mouse.CapturedMode);
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (3)
1091if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 1093Mouse.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)
701if (!stylusIsDown && Mouse.Captured != null && !InWindowClientRect(ptMouse, mouseInputReport.InputSource)) 1140if (e.StagingItem.Input.RoutedEvent == Mouse.LostMouseCaptureEvent || 1141e.StagingItem.Input.RoutedEvent == Mouse.GotMouseCaptureEvent) 1159stylusDevice.Capture(Mouse.Captured, Mouse.CapturedMode); 1797if ((e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseDownEvent) && 1798(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) && 1799(e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseMoveEvent) && 1851e.StagingItem.Input.RoutedEvent != Mouse.PreviewMouseUpEvent) 1854if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseMoveEvent) 1860if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseDownEvent) 1867if (e.StagingItem.Input.RoutedEvent == Mouse.PreviewMouseUpEvent)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
676if (Mouse.Captured != _stylusCapture || Mouse.CapturedMode != _captureMode) 679Mouse.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); 48mouseEventArgs.RoutedEvent = oldValue ? Mouse.MouseLeaveEvent : Mouse.MouseEnterEvent;
System\Windows\UIElement.cs (12)
2191if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2193else if(e.RoutedEvent == Mouse.MouseDownEvent) 2195else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2201if(e.RoutedEvent == Mouse.PreviewMouseDownEvent) 2203else if(e.RoutedEvent == Mouse.MouseDownEvent) 2205else if(e.RoutedEvent == Mouse.PreviewMouseUpEvent) 2368return (Mouse.DirectlyOver == this); 2396Mouse.PrimaryDevice.ReevaluateMouseOver(this, oldParent, isCoreParent); 2401Mouse.PrimaryDevice.ReevaluateCapture(this, oldParent, isCoreParent); 2474return Mouse.Capture(this); 2482if (Mouse.Captured == this) 2484Mouse.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)
937Point currentPosition = Mouse.PrimaryDevice.GetPosition(textView.RenderScope);
MS\Internal\Documents\DocumentGridContextMenu.cs (1)
105uiScopeMouseDownPoint = 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); 1268if (IsDropDownOpen && Mouse.Captured == this && DidMouseMove()) 1676if (Mouse.Captured != comboBox) 1682if (Mouse.Captured == null || !MenuBase.IsDescendant(comboBox, Mouse.Captured as DependencyObject)) 1692if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 1694Mouse.Capture(comboBox, CaptureMode.SubTree); 1722if (Mouse.Captured == comboBox && e.OriginalSource == comboBox) 1725Debug.Assert(!comboBox.CheckAccess() || Mouse.Captured != comboBox, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1773Debug.Assert(!CheckAccess() || Mouse.Captured != this, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1801if (Mouse.LeftButton == MouseButtonState.Pressed && comboBox.HasMouseEnteredItemsHost) 1803if (Mouse.Captured == comboBox) 1805if (Mouse.LeftButton == MouseButtonState.Pressed) 1869if (Mouse.LeftButton == MouseButtonState.Pressed 1918return 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)
1739if (Mouse.LeftButton == MouseButtonState.Pressed) 4807if (Mouse.Capture(this, CaptureMode.SubTree)) 4810_dragPoint = Mouse.GetPosition(this); 4817if (Mouse.Captured == this) 6258Point currentMousePosition = Mouse.GetPosition(this); 6439Point pt = Mouse.GetPosition(row); 6559Point pt = Mouse.GetPosition(cell); 6569Point rowPt = Mouse.GetPosition(rowOwner); 6609UIElement element = Mouse.DirectlyOver as UIElement; 6630UIElement element = Mouse.DirectlyOver as UIElement; 6661Point pt = Mouse.GetPosition(itemsHost);
System\Windows\Controls\DataGridCell.cs (1)
935dataGridOwner.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, 2892Mouse.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) 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)); 962if (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) 2474if ((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); 1583PresentationSource mouseSource = Mouse.PrimaryDevice.CriticalActiveSource; 1584System.Windows.Point pt = Mouse.PrimaryDevice.NonRelativePosition; 1604System.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)
53EventManager.RegisterClassHandler(typeof(Popup), Mouse.LostMouseCaptureEvent, new MouseEventHandler(OnLostMouseCapture)); 1095Debug.Assert( Mouse.Captured == _popupRoot, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot"); 1126IInputElement capturedElement = Mouse.Captured; 1137if (Mouse.LeftButton != MouseButtonState.Released || 1138Mouse.RightButton != MouseButtonState.Released) 1160Mouse.Capture(_popupRoot, CaptureMode.SubTree); 1174if (Mouse.Captured == _popupRoot) 1178Mouse.Capture(null); 1218bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1227if(Mouse.Captured != root) 1232PopupRoot newRoot = Mouse.Captured as PopupRoot; 1237bool newCaptureInsidePopup = childPopupTookCapture || (Mouse.Captured != null && MenuBase.IsDescendant(root, Mouse.Captured as DependencyObject)); 1238bool newCaptureOutsidePopup = !newCaptureInsidePopup && Mouse.Captured != root; 1362e.RoutedEvent != Mouse.LostMouseCaptureEvent; 3020if (Mouse.DirectlyOver != null) 3033Point pt = Mouse.GetPosition(relativeTarget);
System\Windows\Controls\Primitives\Selector.cs (2)
1010_lastMousePosition = Mouse.GetPosition(this); 1017Point 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)
798Mouse.Synchronize();
System\Windows\Controls\Slider.cs (1)
66EventManager.RegisterClassHandler(typeof(Slider), Mouse.MouseDownEvent, new MouseButtonEventHandler(Slider._OnMouseLeftButtonDown),true);
System\Windows\Controls\StickyNote.cs (2)
97EventManager.RegisterClassHandler(owner, Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(_OnPreviewDeviceDown<MouseButtonEventArgs>)); 98EventManager.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)); 986Mouse.Capture(element);
System\Windows\Documents\ImmComposition.cs (3)
1625if (Mouse.LeftButton == MouseButtonState.Pressed) 1629if (Mouse.RightButton == MouseButtonState.Pressed) 1634Point 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)
2976if (Mouse.LeftButton == MouseButtonState.Pressed) 2980if (Mouse.RightButton == MouseButtonState.Pressed) 2993Point point = Mouse.GetPosition(RenderScope);
System\Windows\FrameworkContentElement.cs (3)
87EventManager.RegisterClassHandler(typeof(FrameworkContentElement), Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkContentElement.OnQueryCursor), true); 927Mouse.UpdateCursor(); 959Mouse.UpdateCursor();
System\Windows\FrameworkElement.cs (3)
2377EventManager.RegisterClassHandler(_typeofThis, Mouse.QueryCursorEvent, new QueryCursorEventHandler(FrameworkElement.OnQueryCursorOverride), true); 3880Mouse.UpdateCursor(); 3915Mouse.UpdateCursor();
System\Windows\Input\KeyboardNavigation.cs (2)
3235else if (inputEventArgs.RoutedEvent == Mouse.MouseDownEvent 3236|| inputEventArgs.RoutedEvent == Mouse.MouseUpEvent)
System\Windows\Window.cs (1)
250if (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)
2650Debug.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)
1025if (Mouse.Captured == null) 1041if (Mouse.Captured == null) 1043PresentationSource mouseSource = Mouse.PrimaryDevice.ActiveSource; 1069else if (!RibbonHelper.IsAncestorOf(targetCapture, Mouse.Captured as DependencyObject)) 1076if (Mouse.Captured == null) 1100bool success = Mouse.Capture(targetCapture, CaptureMode.SubTree); 1114Point position = Mouse.GetPosition(element); 1140UIElement source = Mouse.Captured as UIElement; 1198(Mouse.Captured == null || 1201Mouse.Capture(targetCapture, CaptureMode.SubTree); 1218Mouse.Captured != null && 1221Mouse.Capture(null); 1330return (Mouse.Captured == element || 1331RibbonHelper.IsAncestorOf(element, Mouse.Captured as DependencyObject)); 1336return (element != null && Mouse.Captured != null && (Mouse.Captured == element || 1337TreeHelper.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);