_DTE.MainWindow Property

Gets a Window object representing the main development environment window.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)


ReadOnly Property MainWindow As Window
Window MainWindow { get; }
property Window^ MainWindow {
    Window^ get ();
abstract MainWindow : Window
function get MainWindow () : Window

Property Value

Type: EnvDTE.Window
A Window object.


The main environment window is distinct from other windows in the environment. For example, even though its Kind property is not of type vsWindowKindLinkedWindowFrame, it contains linked windows.

You can dock and undock windows from the environment window by adding and removing windows from its LinkedWindows collection.

The LinkedWindows collection is the collection of windows docked to the sides of the main environment window. If two windows are docked together, but not attached in any way to the MainWindow, they do not appear in this collection.


Sub MainWindowExample()
End Sub

.NET Framework Security

See Also


_DTE Interface

EnvDTE Namespace