Udostępnij za pośrednictwem


GestureData Class

Provides information about a gesture.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class GestureData
public class GestureData
public ref class GestureData
type GestureData =  class end
public class GestureData

The GestureData type exposes the following members.

Constructors

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

Top

Properties

  Name Description
Public property Adorners Gets the adorner collection for the designer view stored in the context.
Public property Context Gets the editing context associated with this gesture data.
Public property ImpliedSource Gets the model that is the source of this gesture.
Public property ImpliedTarget Gets the model that is the target of this gesture.
Public property SourceAdorner Gets the source adorner in the view.
Public property SourceModel Gets the object that is the source of this gesture.
Public property TargetAdorner Gets the target adorner in the view.
Public property TargetModel Gets the object that is the target of this gesture.

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 GestureData object from an CanExecuteToolEventArgs object.
Public methodStatic member FromEventArgs(ExecutedToolEventArgs) Provides a GestureData object 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.)

Top

Remarks

Typically, command bindings are unaware of the gesture that triggered the command. This is possible because gestures are generally single actions without any dependencies on prior gestures. For designers, however, rich interaction is required. Therefore, a command may need to know additional information about the input gesture that triggered it. This additional information is provided by the GestureData class, and those classes that derive from it.

The GestureData class provides information about the current editing context through the Context property. Information about the source and target for this gesture is provided through the SourceModel, TargetModel, SourceAdorner, and TargetAdorner properties.

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