69 references to MouseAction
PresentationCore (69)
System\Windows\Input\Command\MouseActionConverter.cs (29)
11/// Converter class for converting between a <see langword="string"/> and <see cref="MouseAction"/>. 16/// Used to check whether we can convert a <see langword="string"/> into a <see cref="MouseAction"/>. 44return IsDefinedMouseAction((MouseAction)context.Instance); 48/// Converts <paramref name="source"/> of <see langword="string"/> type to its <see cref="MouseAction"/> represensation. 53/// <returns>A <see cref="MouseAction"/> representing the <see langword="string"/> specified by <paramref name="source"/>.</returns> 62_ when mouseActionToken.IsEmpty => MouseAction.None, // Special casing as produced by "ConvertTo" 63_ when mouseActionToken.Equals("None", StringComparison.OrdinalIgnoreCase) => MouseAction.None, 64_ when mouseActionToken.Equals("LeftClick", StringComparison.OrdinalIgnoreCase) => MouseAction.LeftClick, 65_ when mouseActionToken.Equals("RightClick", StringComparison.OrdinalIgnoreCase) => MouseAction.RightClick, 66_ when mouseActionToken.Equals("MiddleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.MiddleClick, 67_ when mouseActionToken.Equals("WheelClick", StringComparison.OrdinalIgnoreCase) => MouseAction.WheelClick, 68_ when mouseActionToken.Equals("LeftDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.LeftDoubleClick, 69_ when mouseActionToken.Equals("RightDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.RightDoubleClick, 70_ when mouseActionToken.Equals("MiddleDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.MiddleDoubleClick, 76/// Converts a <paramref name="value"/> of <see cref="MouseAction"/> to its <see langword="string"/> represensation. 82/// <returns>A <see langword="string"/> representing the <see cref="MouseAction"/> specified by <paramref name="value"/>.</returns> 90return (MouseAction)value switch 92MouseAction.None => string.Empty, 93MouseAction.LeftClick => "LeftClick", 94MouseAction.RightClick => "RightClick", 95MouseAction.MiddleClick => "MiddleClick", 96MouseAction.WheelClick => "WheelClick", 97MouseAction.LeftDoubleClick => "LeftDoubleClick", 98MouseAction.RightDoubleClick => "RightDoubleClick", 99MouseAction.MiddleDoubleClick => "MiddleDoubleClick", 100_ => throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(MouseAction)) 109internal static bool IsDefinedMouseAction(MouseAction mouseAction) 111return mouseAction >= MouseAction.None && mouseAction <= MouseAction.MiddleDoubleClick;
System\Windows\Input\Command\MouseActionValueSerializer.cs (4)
41return value is MouseAction && MouseActionConverter.IsDefinedMouseAction((MouseAction)value); 52TypeConverter converter = TypeDescriptor.GetConverter(typeof(MouseAction)); 67TypeConverter converter = TypeDescriptor.GetConverter(typeof(MouseAction));
System\Windows\Input\Command\MouseBinding.cs (7)
47internal MouseBinding(ICommand command, MouseAction mouseAction) 114DependencyProperty.Register("MouseAction", typeof(MouseAction), typeof(MouseBinding), new UIPropertyMetadata(MouseAction.None, new PropertyChangedCallback(OnMouseActionPropertyChanged))); 119public MouseAction MouseAction 123return (MouseAction)GetValue(MouseActionProperty); 134mouseBinding.SynchronizeGestureFromProperties((MouseAction)(e.NewValue)); 196private void SynchronizeGestureFromProperties(MouseAction mouseAction)
System\Windows\Input\Command\MouseGesture.cs (24)
47public MouseGesture(MouseAction mouseAction): this(mouseAction, ModifierKeys.None) 56public MouseGesture( MouseAction mouseAction,ModifierKeys modifiers) // acclerator action 59throw new InvalidEnumArgumentException("mouseAction", (int)mouseAction, typeof(MouseAction)); 81public MouseAction MouseAction 89if (!MouseGesture.IsDefinedMouseAction((MouseAction)value)) 90throw new InvalidEnumArgumentException("value", (int)value, typeof(MouseAction)); 93_mouseAction = (MouseAction)value; 130MouseAction mouseAction = GetMouseAction(inputEventArgs); 131if(mouseAction != MouseAction.None) 140internal static bool IsDefinedMouseAction(MouseAction mouseAction) 142return (mouseAction >= MouseAction.None && mouseAction <= MouseAction.MiddleDoubleClick); 173internal static MouseAction GetMouseAction(InputEventArgs inputArgs) 175MouseAction MouseAction = MouseAction.None; 182MouseAction = MouseAction.WheelClick; 193MouseAction = MouseAction.LeftDoubleClick; 195MouseAction = MouseAction.LeftClick; 202MouseAction = MouseAction.RightDoubleClick; 204MouseAction = MouseAction.RightClick; 211MouseAction = MouseAction.MiddleDoubleClick; 213MouseAction = MouseAction.MiddleClick; 230private MouseAction _mouseAction = MouseAction.None;
System\Windows\Input\Command\MouseGestureConverter.cs (5)
60return new MouseGesture(MouseAction.None, ModifierKeys.None); 75TypeConverter mouseActionConverter = TypeDescriptor.GetConverter(typeof(System.Windows.Input.MouseAction)); 93return new MouseGesture((MouseAction)mouseAction, (ModifierKeys)modifierKeys); 99return new MouseGesture((MouseAction)mouseAction); 163TypeConverter mouseActionConverter = TypeDescriptor.GetConverter(typeof(System.Windows.Input.MouseAction));