Redigera

Dela via


Selection.Toggle(EditingContext, ModelItem) Method

Definition

A selection helper method that takes the existing selection in the context and creates a new selection that contains the toggled state of the item. If the item is to be added to the selection, it is added as the primary selection.

public:
 static System::Activities::Presentation::View::Selection ^ Toggle(System::Activities::Presentation::EditingContext ^ context, System::Activities::Presentation::Model::ModelItem ^ itemToToggle);
public static System.Activities.Presentation.View.Selection Toggle (System.Activities.Presentation.EditingContext context, System.Activities.Presentation.Model.ModelItem itemToToggle);
static member Toggle : System.Activities.Presentation.EditingContext * System.Activities.Presentation.Model.ModelItem -> System.Activities.Presentation.View.Selection
Public Shared Function Toggle (context As EditingContext, itemToToggle As ModelItem) As Selection

Parameters

context
EditingContext

The editing context to apply this selection change to.

itemToToggle
ModelItem

The item to toggle selection for.

Returns

A Selection object that contains the new selection.

Applies to