Window.TopMost Property

Gets or sets a value that indicates whether the application window is always displayed in front of other windows.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Public Property TopMost As Boolean

Property Value

Type: System.Boolean
true if the application window is topmost; otherwise, false. The default is false.


The application is not running outside the browser.


The current thread is not the user interface (UI) thread.


When setting this property, except in response to a user-initiated action, the Application.Startup event has already occurred and Application.HasElevatedPermissions is false.

You can set this property only in the following cases:

If multiple applications have main windows with TopMost values of true, the actual topmost window is the one most recently active.

In Silverlight 5, trusted, out-of-browser applications can create multiple Window instances and manipulate them programmatically. However, the TopMost property is meaningful only for the Application.MainWindow instance.


Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions