ParallelActivityDesigner.CanRemoveActivities(ReadOnlyCollection<Activity>) 方法

定義

傳回值,這個值表示是否能刪除與 ParallelActivityDesigner 關聯之活動的子活動。Returns a value that indicates whether child activities of the activity associated with the ParallelActivityDesigner can be deleted.

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>

要移除之活動的唯讀集合。The read-only collection of activities to remove.

傳回

如果可以將活動從父活動中刪除則為 true,否則為 falsetrue if the activities can be deleted from the parent activity; otherwise false.

範例

下列範例將示範如何覆寫 CanRemoveActivities 方法,以允許移動 ParallelActivityDesigner 內的子活動。The following example shows how to override the CanRemoveActivities method to allow the moving of child activities within the 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

適用於