Поделиться через


DragGestureData - конструктор (EditingContext, ModelItem, ModelItem, Visual, Point, Point, DragDropEffects, IDataObject)

Инициализирует новый экземпляр класса DragGestureData.

Пространство имен:  Microsoft.Windows.Design.Interaction
Сборка:  Microsoft.Windows.Design.Interaction (в Microsoft.Windows.Design.Interaction.dll)

Синтаксис

'Декларация
Public Sub New ( _
    context As EditingContext, _
    sourceModel As ModelItem, _
    targetModel As ModelItem, _
    coordinateReference As Visual, _
    startPosition As Point, _
    currentPosition As Point, _
    allowedEffects As DragDropEffects, _
    data As IDataObject _
)
public DragGestureData(
    EditingContext context,
    ModelItem sourceModel,
    ModelItem targetModel,
    Visual coordinateReference,
    Point startPosition,
    Point currentPosition,
    DragDropEffects allowedEffects,
    IDataObject data
)
public:
DragGestureData(
    EditingContext^ context, 
    ModelItem^ sourceModel, 
    ModelItem^ targetModel, 
    Visual^ coordinateReference, 
    Point startPosition, 
    Point currentPosition, 
    DragDropEffects allowedEffects, 
    IDataObject^ data
)
new : 
        context:EditingContext * 
        sourceModel:ModelItem * 
        targetModel:ModelItem * 
        coordinateReference:Visual * 
        startPosition:Point * 
        currentPosition:Point * 
        allowedEffects:DragDropEffects * 
        data:IDataObject -> DragGestureData
public function DragGestureData(
    context : EditingContext, 
    sourceModel : ModelItem, 
    targetModel : ModelItem, 
    coordinateReference : Visual, 
    startPosition : Point, 
    currentPosition : Point, 
    allowedEffects : DragDropEffects, 
    data : IDataObject
)

Параметры

  • coordinateReference
    Тип: System.Windows.Media.Visual
    Элемент ввода, представляющий начало отсчета координат точек.Это должен быть элемент, который никогда не перемещается — например, DesignerView.
  • startPosition
    Тип: System.Windows.Point
    Положение мыши в момент, когда жест был инициализирован впервые.

Исключения

Исключение Условие
ArgumentNullException

Значение параметра context, sourceModel, targetModel, или data — nullпустая ссылка (Nothing в Visual Basic).

Безопасность платформы .NET Framework

См. также

Ссылки

DragGestureData Класс

DragGestureData - перегрузка

Microsoft.Windows.Design.Interaction - пространство имен

Другие ресурсы

Общее представление о расширяемости конструктора WPF