MouseGestureData Class

Provides information about the mouse position.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Interaction.GestureData
    Microsoft.Windows.Design.Interaction.MouseGestureData
      Microsoft.Windows.Design.Interaction.DragGestureData

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

Syntax

'Declaration
Public Class MouseGestureData _
    Inherits GestureData
public class MouseGestureData : GestureData
public ref class MouseGestureData : public GestureData
type MouseGestureData =  
    class
        inherit GestureData
    end
public class MouseGestureData extends GestureData

The MouseGestureData type exposes the following members.

Constructors

  Name Description
Public method MouseGestureData(EditingContext, ModelItem, ModelItem, Visual, Point, Point) Initializes a new instance of the MouseGestureData class.
Public method MouseGestureData(EditingContext, ModelItem, ModelItem, Visual, Point, Point, DependencyObject, DependencyObject) Initializes a new instance of the MouseGestureData class.

Top

Properties

  Name Description
Public property Adorners Gets the adorner collection for the designer view stored in the context. (Inherited from GestureData.)
Public property Context Gets the editing context associated with this gesture data. (Inherited from GestureData.)
Public property CurrentPosition Gets the current position of the mouse.
Public property ImpliedSource Gets the model that is the source of this gesture. (Inherited from GestureData.)
Public property ImpliedTarget Gets the model that is the target of this gesture. (Inherited from GestureData.)
Public property PositionDelta Gets the offset between starting and ending positions.
Public property SourceAdorner Gets the source adorner in the view. (Inherited from GestureData.)
Public property SourceModel Gets the object that is the source of this gesture. (Inherited from GestureData.)
Public property StartPosition Gets the starting position of the mouse.
Public property TargetAdorner Gets the target adorner in the view. (Inherited from GestureData.)
Public property TargetModel Gets the object that is the target of this gesture. (Inherited from GestureData.)

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 methodStatic member FromEventArgs(CanExecuteToolEventArgs) Provides a MouseGestureData object from an CanExecuteToolEventArgs object.
Public methodStatic member FromEventArgs(ExecutedToolEventArgs) Provides a MouseGestureData from an ExecutedToolEventArgs 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.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TranslatePoint Translates the specified point to the coordinate system of the visual for the specified model.

Top

Remarks

The StartPosition property indicates the position of the mouse when a mouse button was first clicked. All positions are always in the coordinate system of the DesignerView, so that they do not "move" as elements are moved by the user. This decorator is provided to the MouseGestureData class through the coordinateReference parameter. You can transform a coordinate to a different reference by calling the TranslatePoint method.

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