SelectedItem Object, SelectedItems Collection

      Properties   Methods   

The SelectedItem object represents a selected project or project item.

The SelectedItems collection returns a collection of all SelectedItem objects.

Remarks

The SelectedItem object allows you to get the project with the focus in order to provide context for an add-in.

A project always has a SelectedItems collection, even when there are no project items selected. For example, if the Project Explorer has focus and a project node is selected, there is one SelectedItem object. That selected item’s Project property points to the selected project, and the ProjectItem property is Null.