Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
VSPackages can call either OnSelectChangeEx or OnSelectChange when the property data of the current selection has changed and the Properties window must be updated. If the hierarchy or item has also changed requiring an update to the Solution Explorer, VSPackages must call OnSelectChange.
VSPackages call IVsTrackSelectionEx::OnElementValueChange to report changes to an element value.
The SVsTrackSelectionEx service allows VSPackages and the environment to communicate about all parts of the selection context, a collection of values that the environment maintains for every window. The selection context includes:
An IVsHierarchy pointer for access to the current hierarchy
An item identifier (VSITEMID) indicating the current item
An ISelectionContainer pointer for access to property data
An array of element values
Editors or designers that only need to change the ISelectionContainer for the property browser should use STrackSelection. Windows, like the Solution Explorer, that change the active Hierarchy/itemid need to use SVsTrackSelectionEx.