ISelectionService.GetComponentSelected(Object) 方法

定义

获取一个值,该值指示当前是否选定指定组件。Gets a value indicating whether the specified component is currently selected.

public:
 bool GetComponentSelected(System::Object ^ component);
public bool GetComponentSelected (object component);
abstract member GetComponentSelected : obj -> bool
Public Function GetComponentSelected (component As Object) As Boolean

参数

component
Object

要测试的组件。The component to test.

返回

Boolean

如果该组件是用户当前选择的一部分,则为 true;否则为 falsetrue if the component is part of the user's current selection; otherwise, false.

注解

此方法可用于检查当前是否选择了特定组件。This method can be used to check whether a specific component is currently selected. 此过程通常比获取和分析选定组件的整个列表更快。This process is generally quicker than getting and parsing the entire list of selected components.

适用于