69 references to MouseAction
PresentationCore (69)
System\Windows\Input\Command\MouseActionConverter.cs (29)
20/// Converter class for converting between a <see langword="string"/> and <see cref="MouseAction"/>. 25/// Used to check whether we can convert a <see langword="string"/> into a <see cref="MouseAction"/>. 53return IsDefinedMouseAction((MouseAction)context.Instance); 57/// Converts <paramref name="source"/> of <see langword="string"/> type to its <see cref="MouseAction"/> represensation. 62/// <returns>A <see cref="MouseAction"/> representing the <see langword="string"/> specified by <paramref name="source"/>.</returns> 71_ when mouseActionToken.IsEmpty => MouseAction.None, // Special casing as produced by "ConvertTo" 72_ when mouseActionToken.Equals("None", StringComparison.OrdinalIgnoreCase) => MouseAction.None, 73_ when mouseActionToken.Equals("LeftClick", StringComparison.OrdinalIgnoreCase) => MouseAction.LeftClick, 74_ when mouseActionToken.Equals("RightClick", StringComparison.OrdinalIgnoreCase) => MouseAction.RightClick, 75_ when mouseActionToken.Equals("MiddleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.MiddleClick, 76_ when mouseActionToken.Equals("WheelClick", StringComparison.OrdinalIgnoreCase) => MouseAction.WheelClick, 77_ when mouseActionToken.Equals("LeftDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.LeftDoubleClick, 78_ when mouseActionToken.Equals("RightDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.RightDoubleClick, 79_ when mouseActionToken.Equals("MiddleDoubleClick", StringComparison.OrdinalIgnoreCase) => MouseAction.MiddleDoubleClick, 85/// Converts a <paramref name="value"/> of <see cref="MouseAction"/> to its <see langword="string"/> represensation. 91/// <returns>A <see langword="string"/> representing the <see cref="MouseAction"/> specified by <paramref name="value"/>.</returns> 99return (MouseAction)value switch 101MouseAction.None => string.Empty, 102MouseAction.LeftClick => "LeftClick", 103MouseAction.RightClick => "RightClick", 104MouseAction.MiddleClick => "MiddleClick", 105MouseAction.WheelClick => "WheelClick", 106MouseAction.LeftDoubleClick => "LeftDoubleClick", 107MouseAction.RightDoubleClick => "RightDoubleClick", 108MouseAction.MiddleDoubleClick => "MiddleDoubleClick", 109_ => throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(MouseAction)) 118internal static bool IsDefinedMouseAction(MouseAction mouseAction) 120return mouseAction >= MouseAction.None && mouseAction <= MouseAction.MiddleDoubleClick;
System\Windows\Input\Command\MouseActionValueSerializer.cs (4)
46return value is MouseAction && MouseActionConverter.IsDefinedMouseAction((MouseAction)value); 57TypeConverter converter = TypeDescriptor.GetConverter(typeof(MouseAction)); 72TypeConverter converter = TypeDescriptor.GetConverter(typeof(MouseAction));
System\Windows\Input\Command\MouseBinding.cs (7)
56internal MouseBinding(ICommand command, MouseAction mouseAction) 123DependencyProperty.Register("MouseAction", typeof(MouseAction), typeof(MouseBinding), new UIPropertyMetadata(MouseAction.None, new PropertyChangedCallback(OnMouseActionPropertyChanged))); 128public MouseAction MouseAction 132return (MouseAction)GetValue(MouseActionProperty); 143mouseBinding.SynchronizeGestureFromProperties((MouseAction)(e.NewValue)); 205private void SynchronizeGestureFromProperties(MouseAction mouseAction)
System\Windows\Input\Command\MouseGesture.cs (24)
50public MouseGesture(MouseAction mouseAction): this(mouseAction, ModifierKeys.None) 59public MouseGesture( MouseAction mouseAction,ModifierKeys modifiers) // acclerator action 62throw new InvalidEnumArgumentException("mouseAction", (int)mouseAction, typeof(MouseAction)); 84public MouseAction MouseAction 92if (!MouseGesture.IsDefinedMouseAction((MouseAction)value)) 93throw new InvalidEnumArgumentException("value", (int)value, typeof(MouseAction)); 96_mouseAction = (MouseAction)value; 133MouseAction mouseAction = GetMouseAction(inputEventArgs); 134if(mouseAction != MouseAction.None) 143internal static bool IsDefinedMouseAction(MouseAction mouseAction) 145return (mouseAction >= MouseAction.None && mouseAction <= MouseAction.MiddleDoubleClick); 176internal static MouseAction GetMouseAction(InputEventArgs inputArgs) 178MouseAction MouseAction = MouseAction.None; 185MouseAction = MouseAction.WheelClick; 196MouseAction = MouseAction.LeftDoubleClick; 198MouseAction = MouseAction.LeftClick; 205MouseAction = MouseAction.RightDoubleClick; 207MouseAction = MouseAction.RightClick; 214MouseAction = MouseAction.MiddleDoubleClick; 216MouseAction = MouseAction.MiddleClick; 233private MouseAction _mouseAction = MouseAction.None;
System\Windows\Input\Command\MouseGestureConverter.cs (5)
66return new MouseGesture(MouseAction.None, ModifierKeys.None); 81TypeConverter mouseActionConverter = TypeDescriptor.GetConverter(typeof(System.Windows.Input.MouseAction)); 99return new MouseGesture((MouseAction)mouseAction, (ModifierKeys)modifierKeys); 105return new MouseGesture((MouseAction)mouseAction); 169TypeConverter mouseActionConverter = TypeDescriptor.GetConverter(typeof(System.Windows.Input.MouseAction));