IMultiSelectionBroker.TrySetAsPrimarySelection(Selection) 方法

定义

尝试将提供的选择设置为新的 PrimarySelection

public:
 bool TrySetAsPrimarySelection(Microsoft::VisualStudio::Text::Selection candidate);
public bool TrySetAsPrimarySelection (Microsoft.VisualStudio.Text.Selection candidate);
abstract member TrySetAsPrimarySelection : Microsoft.VisualStudio.Text.Selection -> bool
Public Function TrySetAsPrimarySelection (candidate As Selection) As Boolean

参数

candidate
Selection

主选择的新候选项。

返回

Boolean

设置操作是否成功。 如果在中找不到候选项,则将返回 false AllSelections

适用于