ToolGesture Class

Represents a tool interaction with the mouse.

Inheritance Hierarchy

System.Object
  System.Windows.Input.InputGesture
    Microsoft.Windows.Design.Interaction.ToolGesture

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public Class ToolGesture _
    Inherits InputGesture
public class ToolGesture : InputGesture
public ref class ToolGesture : public InputGesture
type ToolGesture =  
    class
        inherit InputGesture
    end
public class ToolGesture extends InputGesture

The ToolGesture type exposes the following members.

Constructors

  Name Description
Public method ToolGesture() Initializes a new instance of the ToolGesture class.
Public method ToolGesture(ToolAction) Initializes a new instance of the ToolGesture class.
Public method ToolGesture(ToolAction, MouseButton) Initializes a new instance of the ToolGesture class.
Public method ToolGesture(ToolAction, MouseButton, ModifierKeys) Initializes a new instance of the ToolGesture class.

Top

Properties

  Name Description
Public property LeftButton Gets or sets whether this gesture is allowed to be performed while the left mouse button is pressed.
Public property MiddleButton Gets or sets whether if this gesture is allowed to be performed while the middle mouse button is pressed.
Public property Modifiers Gets or sets the modifier keys that are allowed to be pressed for this gesture.
Public property RightButton Gets or sets whether this gesture is allowed to be performed while the right mouse button is pressed.
Public property ToolAction Gets or sets the action associated with this gesture.
Public property XButton1 Gets or sets whether this gesture is allowed to be performed while the xbutton1 mouse button is pressed.
Public property XButton2 Gets or sets whether this gesture is allowed to be performed while the xbutton2 mouse button is pressed.

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Matches Returns a value indicating whether this gesture matches an input event. (Overrides InputGesture.Matches(Object, InputEventArgs).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that describes the gesture for diagnostic purposes. (Overrides Object.ToString().)

Top

Remarks

A tool gesture is a Windows Presentation Foundation (WPF)-style input gesture that represents a tool interaction with the mouse. The ToolGesture class is similar to the MouseGesture class, but defines a richer set of interactions. Note that ToolGesture and MouseGesture overlap, and the designer adorner that translates events into input bindings can use both. The designer adorner favors tool gestures, and in their absence will look for mouse gestures.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Windows.Design.Interaction Namespace

Other Resources

Understanding WPF Designer Extensibility