70 references to MouseAction
PresentationCore (70)
System\Windows\Input\Command\MouseActionConverter.cs (30)
10/// Converter class for converting between a <see langword="string"/> and <see cref="MouseAction"/>. 15/// Used to check whether we can convert a <see langword="string"/> into a <see cref="MouseAction"/>. 43return IsDefinedMouseAction((MouseAction)context.Instance); 47/// Converts <paramref name="source"/> of <see langword="string"/> type to its <see cref="MouseAction"/> represensation. 52/// <returns>A <see cref="MouseAction"/> representing the <see langword="string"/> specified by <paramref name="source"/>.</returns> 61_ when mouseActionToken.IsEmpty => MouseAction.None, // Special casing as produced by "ConvertTo" 62_ when mouseActionToken.Equals("None", StringComparison.OrdinalIgnoreCase) => MouseAction.None, 63_ when mouseActionToken.Equals("LeftClick", StringComparison.OrdinalIgnoreCase) => MouseAction.LeftClick, 64_ when mouseActionToken.Equals("RightClick", StringComparison.OrdinalIgnoreCase) => MouseAction.RightClick, 65_ when mouseActionToken.Equals("MiddleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.MiddleClick, 66_ when mouseActionToken.Equals("WheelClick", StringComparison.OrdinalIgnoreCase) => MouseAction.WheelClick, 67_ when mouseActionToken.Equals("LeftDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.LeftDoubleClick, 68_ when mouseActionToken.Equals("RightDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.RightDoubleClick, 69_ when mouseActionToken.Equals("MiddleDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.MiddleDoubleClick, 75/// Converts a <paramref name="value"/> of <see cref="MouseAction"/> to its <see langword="string"/> represensation. 81/// <returns>A <see langword="string"/> representing the <see cref="MouseAction"/> specified by <paramref name="value"/>.</returns> 89MouseAction mouseAction = (MouseAction)value; 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)mouseAction, typeof(MouseAction)) 109internal static bool IsDefinedMouseAction(MouseAction mouseAction) 111return mouseAction >= MouseAction.None && mouseAction <= MouseAction.MiddleDoubleClick;
System\Windows\Input\Command\MouseActionValueSerializer.cs (4)
40return value is MouseAction && MouseActionConverter.IsDefinedMouseAction((MouseAction)value); 51TypeConverter converter = TypeDescriptor.GetConverter(typeof(MouseAction)); 66TypeConverter converter = TypeDescriptor.GetConverter(typeof(MouseAction));
System\Windows\Input\Command\MouseBinding.cs (7)
46internal MouseBinding(ICommand command, MouseAction mouseAction) 110DependencyProperty.Register("MouseAction", typeof(MouseAction), typeof(MouseBinding), new UIPropertyMetadata(MouseAction.None, new PropertyChangedCallback(OnMouseActionPropertyChanged))); 115public MouseAction MouseAction 119return (MouseAction)GetValue(MouseActionProperty); 130mouseBinding.SynchronizeGestureFromProperties((MouseAction)(e.NewValue)); 192private void SynchronizeGestureFromProperties(MouseAction mouseAction)
System\Windows\Input\Command\MouseGesture.cs (24)
46public MouseGesture(MouseAction mouseAction): this(mouseAction, ModifierKeys.None) 55public MouseGesture( MouseAction mouseAction,ModifierKeys modifiers) // acclerator action 58throw new InvalidEnumArgumentException("mouseAction", (int)mouseAction, typeof(MouseAction)); 80public MouseAction MouseAction 88if (!MouseGesture.IsDefinedMouseAction((MouseAction)value)) 89throw new InvalidEnumArgumentException("value", (int)value, typeof(MouseAction)); 92_mouseAction = (MouseAction)value; 129MouseAction mouseAction = GetMouseAction(inputEventArgs); 130if(mouseAction != MouseAction.None) 139internal static bool IsDefinedMouseAction(MouseAction mouseAction) 141return (mouseAction >= MouseAction.None && mouseAction <= MouseAction.MiddleDoubleClick); 172internal static MouseAction GetMouseAction(InputEventArgs inputArgs) 174MouseAction MouseAction = MouseAction.None; 181MouseAction = MouseAction.WheelClick; 192MouseAction = MouseAction.LeftDoubleClick; 194MouseAction = MouseAction.LeftClick; 201MouseAction = MouseAction.RightDoubleClick; 203MouseAction = MouseAction.RightClick; 210MouseAction = MouseAction.MiddleDoubleClick; 212MouseAction = MouseAction.MiddleClick; 229private MouseAction _mouseAction = MouseAction.None;
System\Windows\Input\Command\MouseGestureConverter.cs (5)
59return new MouseGesture(MouseAction.None, ModifierKeys.None); 74TypeConverter mouseActionConverter = TypeDescriptor.GetConverter(typeof(System.Windows.Input.MouseAction)); 92return new MouseGesture((MouseAction)mouseAction, (ModifierKeys)modifierKeys); 98return new MouseGesture((MouseAction)mouseAction); 162TypeConverter mouseActionConverter = TypeDescriptor.GetConverter(typeof(System.Windows.Input.MouseAction));