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>

要从与设计器关联的复合活动中移除的活动的只读数组。

返回

如果可以从复合活动中移除活动,则为 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 可确定是否可以从复合活动中移除包含的一系列活动。

适用于