Share via


IMultiSelectionBroker.SetSelection(Selection) Method

Definition

Clears the current selections and adds one as the new value. This also becomes the PrimarySelection.

public:
 void SetSelection(Microsoft::VisualStudio::Text::Selection selection);
public void SetSelection (Microsoft.VisualStudio.Text.Selection selection);
abstract member SetSelection : Microsoft.VisualStudio.Text.Selection -> unit
Public Sub SetSelection (selection As Selection)

Parameters

selection
Selection

The selection to leave as the value of PrimarySelection and sole member of AllSelections.

Remarks

This will throw if it not based on CurrentSnapshot.

Applies to