CompositeActivityDesigner.CanMoveActivities 方法

定义

返回一个值,该值指示是否可以将复合活动中包含的活动移出与设计器关联的复合活动。

public:
 virtual bool CanMoveActivities(System::Workflow::ComponentModel::Design::HitTestInfo ^ moveLocation, System::Collections::ObjectModel::ReadOnlyCollection<System::Workflow::ComponentModel::Activity ^> ^ activitiesToMove);
public virtual bool CanMoveActivities (System.Workflow.ComponentModel.Design.HitTestInfo moveLocation, System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> activitiesToMove);
abstract member CanMoveActivities : System.Workflow.ComponentModel.Design.HitTestInfo * System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> -> bool
override this.CanMoveActivities : System.Workflow.ComponentModel.Design.HitTestInfo * System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.ComponentModel.Activity> -> bool
Public Overridable Function CanMoveActivities (moveLocation As HitTestInfo, activitiesToMove As ReadOnlyCollection(Of Activity)) As Boolean

参数

moveLocation
HitTestInfo

从该处移动活动的位置。

activitiesToMove
ReadOnlyCollection<Activity>

要移动的活动的只读数组。

返回

Boolean

如果可以从复合活动中移出活动,则为 true;否则为 false

示例

下面的示例演示如何重写 CanMoveActivities 方法,以便允许在 CompositeActivityDesigner 内移动子活动。

public override bool CanMoveActivities(HitTestInfo moveLocation, ReadOnlyCollection<Activity> activitiesToMove)
{
    return false;
}
Public Overrides Function CanMoveActivities(ByVal moveLocation As HitTestInfo, ByVal activitiesToMove As ReadOnlyCollection(Of Activity)) As Boolean
    Return False
End Function

注解

使用 CanMoveActivities 可确定是否可以从复合活动中移出一系列活动。

适用于