共用方式為


StructuredCompositeActivityDesigner.CanRemoveActivities 方法

定義

傳回值,這個值表示是否可從 StructuredCompositeActivityDesigner 移除指定的活動。

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>

Activity 唯讀集合,包含要移除的活動。

傳回

Boolean

如果可以移除指定的活動則為 true,否則為 false

範例

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

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

適用於