55 references to MouseGesture
PresentationCore (3)
System\Windows\Input\Command\MouseGesture.cs (1)
47
public MouseGesture(MouseAction mouseAction):
this
(mouseAction, ModifierKeys.None)
System\Windows\Input\Command\MouseGestureConverter.cs (2)
60
return new
MouseGesture
(MouseAction.None, ModifierKeys.None);
93
return new
MouseGesture
((MouseAction)mouseAction, (ModifierKeys)modifierKeys);
PresentationCore.Tests (52)
System\Windows\Input\Command\KeyGestureConverter.Tests.cs (3)
68
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Alt), typeof(string) };
139
yield return new object?[] { CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control) };
212
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), typeof(string) };
System\Windows\Input\Command\MouseGestureConverter.Tests.cs (49)
43
yield return new object[] { true, true, new
MouseGesture
(MouseAction.None, ModifierKeys.Control), typeof(string) };
44
yield return new object[] { true, true, new
MouseGesture
(MouseAction.None, ModifierKeys.Alt), typeof(string) };
45
yield return new object[] { true, true, new
MouseGesture
(MouseAction.MiddleDoubleClick, ModifierKeys.Shift), typeof(string) };
46
yield return new object[] { true, true, new
MouseGesture
(MouseAction.LeftDoubleClick, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt), typeof(string) };
47
yield return new object[] { true, true, new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Control | ModifierKeys.Windows), typeof(string) };
48
yield return new object[] { true, true, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Alt | ModifierKeys.Windows), typeof(string) };
49
yield return new object[] { true, true, new
MouseGesture
(MouseAction.RightClick, ModifierKeys.Alt | ModifierKeys.Control), typeof(string) };
50
yield return new object[] { true, true, new
MouseGesture
(MouseAction.RightDoubleClick, ModifierKeys.Alt | ModifierKeys.Windows | ModifierKeys.Control), typeof(string) };
51
yield return new object[] { true, true, new
MouseGesture
(MouseAction.RightDoubleClick, ModifierKeys.None), typeof(string) };
62
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.None, ModifierKeys.Control), null };
63
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Control | ModifierKeys.Windows), typeof(KeyGesture) };
64
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Alt | ModifierKeys.Windows), typeof(MouseGesture) };
65
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.None, ModifierKeys.Control), typeof(MouseAction) };
66
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.RightDoubleClick, ModifierKeys.Alt | ModifierKeys.Windows | ModifierKeys.Control), typeof(Key) };
67
yield return new object?[] { false, true, new
MouseGesture
(MouseAction.RightDoubleClick, ModifierKeys.None), typeof(ModifierKeys) };
93
yield return new object?[] { new
MouseGesture
(MouseAction.None, ModifierKeys.None), null, CultureInfo.InvariantCulture, string.Empty };
94
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.None), null, new CultureInfo("ru-RU"), "LeftClick" };
95
yield return new object?[] { new
MouseGesture
(MouseAction.None, ModifierKeys.Control), null, CultureInfo.InvariantCulture, "Ctrl+" };
96
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), null, CultureInfo.InvariantCulture, "Ctrl+LeftClick" };
97
yield return new object?[] { new
MouseGesture
(MouseAction.MiddleDoubleClick, ModifierKeys.Alt), null, new CultureInfo("no-NO"), "Alt+MiddleDoubleClick" };
98
yield return new object?[] { new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Shift), null, CultureInfo.InvariantCulture, "Shift+WheelClick" };
99
yield return new object?[] { new
MouseGesture
(MouseAction.LeftDoubleClick, ModifierKeys.Windows), null, CultureInfo.InvariantCulture, "Windows+LeftDoubleClick" };
100
yield return new object?[] { new
MouseGesture
(MouseAction.RightClick, ModifierKeys.Control | ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Ctrl+Alt+RightClick" };
101
yield return new object?[] { new
MouseGesture
(MouseAction.RightDoubleClick, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Ctrl+Alt+Windows+RightDoubleClick" };
104
yield return new object?[] { new
MouseGesture
(MouseAction.None, ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Alt+ " };
105
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.None), null, CultureInfo.InvariantCulture, " LeftClick " };
106
yield return new object?[] { new
MouseGesture
(MouseAction.None, ModifierKeys.None), null, CultureInfo.InvariantCulture, " " };
107
yield return new object?[] { new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Shift), null, CultureInfo.InvariantCulture, "Shift +WheelClick" };
108
yield return new object?[] { new
MouseGesture
(MouseAction.MiddleClick, ModifierKeys.Windows | ModifierKeys.Shift), null, new CultureInfo("no-NO"), " Shift + Windows + MiddleClick " };
109
yield return new object?[] { new
MouseGesture
(MouseAction.LeftDoubleClick, ModifierKeys.Windows), null, CultureInfo.InvariantCulture, "Windows+ LeftDoubleClick " };
110
yield return new object?[] { new
MouseGesture
(MouseAction.RightClick, ModifierKeys.Control | ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Ctrl+Alt+ RightClick" };
130
yield return new object?[] { CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control) };
156
yield return new object?[] { string.Empty, null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.None, ModifierKeys.None) };
157
yield return new object?[] { "Alt+", null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.None, ModifierKeys.Alt) };
158
yield return new object?[] { "Windows+", null, new CultureInfo("de-DE"), new
MouseGesture
(MouseAction.None, ModifierKeys.Windows) };
159
yield return new object?[] { "Shift+", null, new CultureInfo("ru-RU"), new
MouseGesture
(MouseAction.None, ModifierKeys.Shift) };
161
yield return new object?[] { "Ctrl+LeftClick", null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control) };
162
yield return new object?[] { "Alt+RightClick", null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.RightClick, ModifierKeys.Alt) };
163
yield return new object?[] { "Windows+WheelClick", null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Windows) };
164
yield return new object?[] { "Alt+RightDoubleClick", null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.RightDoubleClick, ModifierKeys.Alt) };
165
yield return new object?[] { "Ctrl+Alt+Windows+WheelClick", null, new CultureInfo("de-DE"), new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt) };
166
yield return new object?[] { "Alt+Windows+MiddleDoubleClick", null, new CultureInfo("ru-RU"), new
MouseGesture
(MouseAction.MiddleDoubleClick, ModifierKeys.Alt | ModifierKeys.Windows) };
167
yield return new object?[] { "Ctrl+Alt+Windows+MiddleClick", null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.MiddleClick, ModifierKeys.Alt | ModifierKeys.Windows | ModifierKeys.Control) };
176
Assert.Throws<ArgumentNullException>(() => converter.ConvertTo(null, CultureInfo.InvariantCulture, new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), null));
193
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), typeof(MouseGesture) };
194
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), typeof(KeyGesture) };
195
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), typeof(MouseAction) };
196
yield return new object?[] { new
MouseGesture
(MouseAction.LeftClick, ModifierKeys.Control), typeof(Key) };
197
yield return new object?[] { new
MouseGesture
(MouseAction.WheelClick, ModifierKeys.Control), typeof(ModifierKeys) };