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
)
參數
- context
型別:Microsoft.Windows.Design.EditingContext
含有筆勢資料的編輯內容。
- sourceModel
型別:Microsoft.Windows.Design.Model.ModelItem
筆勢起始處的模型
- targetModel
型別:Microsoft.Windows.Design.Model.ModelItem
筆勢目前停留的模型。
- coordinateReference
型別:System.Windows.Media.Visual
輸入項目,表示點的座標參考。這必須是永遠不會移動的項目,例如 DesignerView 類別。
- startPosition
型別:System.Windows.Point
筆勢初次啟始時的滑鼠位置。
- currentPosition
型別:System.Windows.Point
滑鼠目前的位置。
- allowedEffects
型別:System.Windows.DragDropEffects
允許的拖放效果。
- data
型別:System.Windows.IDataObject
拖曳的資料。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | context、sourceModel、targetModel 或 data 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.Windows.Design.Interaction 命名空間