CompositeActivityDesigner.CanMoveActivities 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回值,這個值會指出是否可以將包含在複合活動內的活動移出與設計工具相關聯的複合活動。
public:
virtual bool CanMoveActivities(System::Workflow::ComponentModel::Design::HitTestInfo ^ moveLocation, System::Collections::ObjectModel::ReadOnlyCollection<System::Workflow::ComponentModel::Activity ^> ^ activitiesToMove);
public virtual bool CanMoveActivities (System.Workflow.ComponentModel.Design.HitTestInfo moveLocation, System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> activitiesToMove);
abstract member CanMoveActivities : System.Workflow.ComponentModel.Design.HitTestInfo * System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> -> bool
override this.CanMoveActivities : System.Workflow.ComponentModel.Design.HitTestInfo * System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> -> bool
Public Overridable Function CanMoveActivities (moveLocation As HitTestInfo, activitiesToMove As ReadOnlyCollection(Of Activity)) As Boolean
參數
- moveLocation
- HitTestInfo
要移動活動的來源位置。
- activitiesToMove
- ReadOnlyCollection<Activity>
要移動之活動的唯讀陣列。
傳回
如果可以將活動從複合活動中移動則為 true
,否則為 false
。
範例
下列範例將示範如何覆寫 CanMoveActivities 方法,以允許移動 CompositeActivityDesigner 內的子活動。
public override bool CanMoveActivities(HitTestInfo moveLocation, ReadOnlyCollection<Activity> activitiesToMove)
{
return false;
}
Public Overrides Function CanMoveActivities(ByVal moveLocation As HitTestInfo, ByVal activitiesToMove As ReadOnlyCollection(Of Activity)) As Boolean
Return False
End Function
備註
您可以使用 CanMoveActivities 決定是否可以將活動清單從複合活動中移動。