初始化 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, _
sourceAdorner As DependencyObject, _
targetAdorner As DependencyObject _
)
public DragGestureData(
EditingContext context,
ModelItem sourceModel,
ModelItem targetModel,
Visual coordinateReference,
Point startPosition,
Point currentPosition,
DragDropEffects allowedEffects,
IDataObject data,
DependencyObject sourceAdorner,
DependencyObject targetAdorner
)
public:
DragGestureData(
EditingContext^ context,
ModelItem^ sourceModel,
ModelItem^ targetModel,
Visual^ coordinateReference,
Point startPosition,
Point currentPosition,
DragDropEffects allowedEffects,
IDataObject^ data,
DependencyObject^ sourceAdorner,
DependencyObject^ targetAdorner
)
new :
context:EditingContext *
sourceModel:ModelItem *
targetModel:ModelItem *
coordinateReference:Visual *
startPosition:Point *
currentPosition:Point *
allowedEffects:DragDropEffects *
data:IDataObject *
sourceAdorner:DependencyObject *
targetAdorner:DependencyObject -> DragGestureData
public function DragGestureData(
context : EditingContext,
sourceModel : ModelItem,
targetModel : ModelItem,
coordinateReference : Visual,
startPosition : Point,
currentPosition : Point,
allowedEffects : DragDropEffects,
data : IDataObject,
sourceAdorner : DependencyObject,
targetAdorner : DependencyObject
)
參數
- 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
拖曳的資料。
- sourceAdorner
型別:System.Windows.DependencyObject
與筆勢相關聯的原始裝飾項 (如果存在的話)。這個參數可以是 nullNull 參照 (即 Visual Basic 中的 Nothing)。
- targetAdorner
型別:System.Windows.DependencyObject
與筆勢相關聯的目標裝飾項 (如果存在的話)。這個參數可以是 nullNull 參照 (即 Visual Basic 中的 Nothing)。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.Windows.Design.Interaction 命名空間