Page.WindowWidth Property

Gets or sets the width of the host Window or NavigationWindow of a Page.

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

public double WindowWidth { get; set; }
/** @property */
public double get_WindowWidth ()

/** @property */
public void set_WindowWidth (double value)

public function get WindowWidth () : double

public function set WindowWidth (value : double)

<object WindowWidth="double" .../>

Property Value

A Double value that is the width of a window that directly hosts a Page.

WindowWidth is only applied when a Page is hosted directly by a window, which includes:

  • Window

  • NavigationWindow

  • Windows Internet Explorer

If a Page is hosted by a Frame, setting WindowWidth has not effect. Although, you can still get the value of WindowWidth.

A Page in an XAML browser application (XBAP) can only use WindowWidth to change the width of Windows Internet Explorer; the width can't be changed by setting Width, MinWidth, or MaxWidth.

The minimum width of the Windows Internet Explorer window is 250 pixels. For browser-hosted pages, this means that the value of WindowWidth may not be applied if it would cause the total width of the Windows Internet Explorer window to be less than 250 pixels.

See How to: Set the Width of a Window from a Page.

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: