Window2::Selection Property
Visual Studio 2015
Gets an object representing the current selection on the Window object.
Assembly: EnvDTE80 (in EnvDTE80.dll)
Implements
Window::SelectionThis example makes a text file the active window. It then uses it to iterate through the windows collection and to display the name of the containing project and project item for the window.
Before running this example, open a project in Visual Studio and add a text file named "TextFile1.txt" to it. Add some text to the file and select it. The example displays the selected text in a message box.
Show: