Gets or sets a value that indicates whether a window is activated when first shown.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
Metadata properties set to true
When a window with its property set to false is opened, the window is not activated and its Activated event is not raised until a user manually activates the window by selecting it. After the window is selected, it activates and deactivates normally.
To prevent a window from being activated when it opens, the property must be set to false before the window is shown (by calling Show); setting to false after a window is shown has no effect.
Setting to false on a window that is opened modally, by calling ShowDialog, has no real impact. Although the modal window will not be activated, the modal window will prevent the user from activating any other open application windows.
The following example shows how to use markup to configure a window to be opened without being activated.
The following example shows how to use code to configure a window to be opened without it being activated.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.