Window.Activate Method

Attempts to activate the application window by bringing it to the foreground and setting the input focus to it.

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

public bool Activate()

Return Value

Type: System.Boolean
true if the window was successfully activated; otherwise, false.


The application is not running outside the browser.


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

The rules that determine whether the window is activated are the same as those used by the Win32 SetForegroundWindow function (User32.dll).

Use the IsActive property to determine whether the window is already active.


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