共用方式為


ParallelActivityDesigner.CanRemoveActivities 方法

定義

傳回值,這個值表示是否能刪除與 ParallelActivityDesigner 關聯之活動的子活動。

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

參數

activitiesToRemove
ReadOnlyCollection<Activity>

要移除之活動的唯讀集合。

傳回

Boolean

如果可以將活動從父活動中刪除則為 true,否則為 false

範例

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

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

適用於