This documentation is archived and is not being maintained.

Window.WindowStartupLocation Property

Gets or sets the position of the window when first shown.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

public WindowStartupLocation WindowStartupLocation { get; set; }
/** @property */
public WindowStartupLocation get_WindowStartupLocation ()

/** @property */
public void set_WindowStartupLocation (WindowStartupLocation value)

public function get WindowStartupLocation () : WindowStartupLocation

public function set WindowStartupLocation (value : WindowStartupLocation)

<object WindowStartupLocation="WindowStartupLocation" .../>

Property Value

A WindowStartupLocation value that specifies the position of a window when first shown. The default value is Manual.

Setting WindowStartupLocation to Manual causes a window to be positioned according to its Left and Top property values. If you set WindowStartupLocation to CenterScreen or CenterOwner and the system cannot determine the window's location, the window is positioned according to its Left and Top property values. If there are multiple screens, CenterScreen is specified, and the system can determine the window's location, the window is centered on the screen which contains the mouse cursor.


You cannot set or get this property when a window is hosted in a browser.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0