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

适用于