Export (0) Print
Expand All

StructuredCompositeActivityDesigner.CanInsertActivities Method

Returns a value that indicates whether the specified activities can be added to the StructuredCompositeActivityDesigner at the specified location on the workflow design surface.

Namespace:  System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public override bool CanInsertActivities(
	HitTestInfo insertLocation,
	ReadOnlyCollection<Activity> activitiesToInsert


Type: System.Workflow.ComponentModel.Design.HitTestInfo

The HitTestInfo that contains the screen location at which to attempt to insert the activities.

Type: System.Collections.ObjectModel.ReadOnlyCollection<Activity>

The Activity read-only collection that contains the activities to add.

Return Value

Type: System.Boolean
true if the specified activities can be inserted at the specified location on the workflow design surface; otherwise, false.

The following example shows how to lock a StructuredCompositeActivityDesigner by not allowing the insertion of child activities.

public override bool CanInsertActivities(HitTestInfo insertLocation, ReadOnlyCollection<Activity> activitiesToInsert)
    return false;

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0
© 2015 Microsoft