Export (0) Print
Expand All

Window.WindowState Property

Gets or sets whether a window is restored, minimized, or maximized. This is a dependency property.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public:
property WindowState WindowState {
	WindowState get ();
	void set (WindowState value);
}
/** @property */
public WindowState get_WindowState ()

/** @property */
public void set_WindowState (WindowState value)

public function get WindowState () : WindowState

public function set WindowState (value : WindowState)

<object WindowState="WindowState" .../>

Property Value

A WindowState that determines whether a window is restored, minimized, or maximized. The default is Normal (restored).

Identifier field

WindowStateProperty

Metadata properties set to true

BindsTwoWayByDefault

Before a window is minimized or maximized, its size and location are stored in in RestoreBounds. When a window is subsequently restored, its size and location values are restored with the values from RestoreBounds.

When the WindowState property is changed, StateChanged is raised.

NoteNote:

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

Community Additions

ADD
Show:
© 2014 Microsoft