共用方式為


CompositeActivityDesigner.CanRemoveActivities 方法

定義

傳回值,這個值會指出是否可將活動從與設計工具相關聯的複合活動中移除。

public:
 virtual bool CanRemoveActivities(System::Collections::ObjectModel::ReadOnlyCollection<System::Workflow::ComponentModel::Activity ^> ^ activitiesToRemove);
public virtual bool CanRemoveActivities (System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> activitiesToRemove);
abstract member CanRemoveActivities : System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> -> bool
override this.CanRemoveActivities : System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> -> bool
Public Overridable Function CanRemoveActivities (activitiesToRemove As ReadOnlyCollection(Of Activity)) As Boolean

參數

activitiesToRemove
ReadOnlyCollection<Activity>

要從與設計工具關聯的複合活動中移除之活動的唯讀陣列。

傳回

Boolean

如果可以將活動從複合活動中移除則為 true,否則為 false

範例

下列範例將示範如何覆寫 CanRemoveActivities 方法,以允許移動 CompositeActivityDesigner 內的子活動。

public override bool CanRemoveActivities(ReadOnlyCollection<Activity> activitiesToRemove)
{
    return true;
}
Public Overrides Function CanRemoveActivities(ByVal activitiesToRemove As ReadOnlyCollection(Of Activity)) As Boolean
    Return True
End Function

備註

您可以使用 CanRemoveActivities 決定是否可以將包含之活動的清單從複合活動中移除。

適用於