共用方式為


IVsTrackSelectionEx Interface

Definition

Notifies the environment of a change in the current selection and provides access to hierarchy and item information relating to the new selection.

public interface class IVsTrackSelectionEx : Microsoft::VisualStudio::Shell::Interop::ITrackSelection
public interface class IVsTrackSelectionEx : Microsoft::VisualStudio::Shell::Interop::ITrackSelection
__interface IVsTrackSelectionEx : Microsoft::VisualStudio::Shell::Interop::ITrackSelection
[System.Runtime.InteropServices.Guid("18291FD1-A1DD-4264-AEAD-6AFD616BF15A")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsTrackSelectionEx : Microsoft.VisualStudio.Shell.Interop.ITrackSelection
[System.Runtime.InteropServices.Guid("18291FD1-A1DD-4264-AEAD-6AFD616BF15A")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsTrackSelectionEx : Microsoft.VisualStudio.Shell.Interop.ITrackSelection
[<System.Runtime.InteropServices.Guid("18291FD1-A1DD-4264-AEAD-6AFD616BF15A")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsTrackSelectionEx = interface
    interface ITrackSelection
[<System.Runtime.InteropServices.Guid("18291FD1-A1DD-4264-AEAD-6AFD616BF15A")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsTrackSelectionEx = interface
    interface ITrackSelection
Public Interface IVsTrackSelectionEx
Implements ITrackSelection
Attributes
Implements

Remarks

Project-type windows use IVsTrackSelectionEx to track changes to the active project. Such changes can include the current hierarchy, current project item, and element of selection. Project-type windows typically provide feedback to the user, possibly by highlighting a new item in the Solution Explorer window or changing the Visual Studio title bar.

Document and tool windows typically do not call IVsTrackSelectionEx because they track changes to selected objects only. These windows never alter the project hierarchy or item.

Notes to Callers

Components that populate the client area of a window call IVsTrackSelectionEx typically through the SVsTrackSelectionEx service to inform the environment of a change in selection within their window.

Methods

GetCurrentSelection(IntPtr, UInt32, IVsMultiItemSelect, IntPtr)

Returns the current selection.

IsMyHierarchyCurrent(Int32)

Determines whether the user's hierarchy is current.

OnElementValueChange(UInt32, Int32, Object)

Informs the environment that a change in an element value has occurred. Element values are attached to a window's selection context and used in the same way to update the environment's user interface.

OnSelectChange(ISelectionContainer)

Reports that the current selection container has changed.

OnSelectChangeEx(IntPtr, UInt32, IVsMultiItemSelect, IntPtr)

Informs the environment that a change in the current selection has occurred.

Applies to