MouseGestureData 类

提供有关鼠标位置的信息。

继承层次结构

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

命名空间:  Microsoft.Windows.Design.Interaction
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)

语法

声明
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

MouseGestureData 类型公开以下成员。

构造函数

  名称 说明
公共方法 MouseGestureData(EditingContext, ModelItem, ModelItem, Visual, Point, Point) 初始化 MouseGestureData 类的新实例。
公共方法 MouseGestureData(EditingContext, ModelItem, ModelItem, Visual, Point, Point, DependencyObject, DependencyObject) 初始化 MouseGestureData 类的新实例。

页首

属性

  名称 说明
公共属性 Adorners 获取上下文中存储的设计器视图的装饰器集合。 (继承自 GestureData。)
公共属性 Context 获取与此笔势数据关联的编辑的上下文。 (继承自 GestureData。)
公共属性 CurrentPosition 获取鼠标的当前的位置。
公共属性 ImpliedSource 获取作为此笔势的源的模型。 (继承自 GestureData。)
公共属性 ImpliedTarget 获取作为此笔势的目标的模型。 (继承自 GestureData。)
公共属性 PositionDelta 获取起始位置和结束位置间的偏移量。
公共属性 SourceAdorner 获取视图中的源装饰器。 (继承自 GestureData。)
公共属性 SourceModel 获取作为此笔势的源的对象。 (继承自 GestureData。)
公共属性 StartPosition 获取鼠标的起始位置。
公共属性 TargetAdorner 获取视图中的目标装饰器。 (继承自 GestureData。)
公共属性 TargetModel 获取作为此笔势的目标的对象。 (继承自 GestureData。)

页首

方法

  名称 说明
公共方法 Equals 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法静态成员 FromEventArgs(CanExecuteToolEventArgs) CanExecuteToolEventArgs 对象提供 MouseGestureData 对象。
公共方法静态成员 FromEventArgs(ExecutedToolEventArgs) 获取 ExecutedToolEventArgs 对象中的 MouseGestureData 对象。
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)
公共方法 TranslatePoint 将指定的点转换为指定模型的视觉坐标系统。

页首

备注

StartPosition 属性显示第一次点击鼠标时鼠标的位置。 所有位置始终位于 DesignerView 的坐标系统中,用户不会将其作为元素移动. 此修饰器通过 coordinateReference 参数提供给 MouseGestureData 类。 可通过调用 TranslatePoint 方法将坐标转换为不同的参考。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.Windows.Design.Interaction 命名空间

其他资源

了解 WPF 设计器扩展性