Class CommandMouseGestureService
Represents a mouse gesture service for command.
[Export(typeof(ICommandMouseGestureService))]
public class CommandMouseGestureService : ICommandMouseGestureService
- Inheritance
-
CommandMouseGestureService
- Implements
- Inherited Members
Constructors
CommandMouseGestureService(CommandMouseShortcut[], ExcludeCommandMouseShortcut[], ICommandService)
Initializes a new instance of the CommandMouseGestureService class.
[ImportingConstructor]
public CommandMouseGestureService(CommandMouseShortcut[] mouseShortcuts, ExcludeCommandMouseShortcut[] excludeMouseShortcuts, ICommandService commandService)
Parameters
mouseShortcuts
CommandMouseShortcut[]Imported mouse shortcuts.
excludeMouseShortcuts
ExcludeCommandMouseShortcut[]Excluded imported mouse shortcuts.
commandService
ICommandServiceImported command service.
Methods
BindMouseGestures(FrameworkElement, ILayoutItem)
Binds the mouse gestures to ui element and layout item.
public void BindMouseGestures(FrameworkElement element, ILayoutItem layoutItem)
Parameters
element
FrameworkElementThe associated uiElement.
layoutItem
ILayoutItemThe associated layout item. This is null for global commands.
GetPrimaryMouseGesture(CommandDefinitionBase)
Gets the mouse gesture for a command definition.
public MouseGesture GetPrimaryMouseGesture(CommandDefinitionBase commandDefinition)
Parameters
commandDefinition
CommandDefinitionBaseThe command definition.
Returns
- MouseGesture
The associated mouse gesture.