Page.WindowHeight Property


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

 property double WindowHeight { double get(); void set(double value); };
public double WindowHeight { get; set; }
member this.WindowHeight : double with get, set
Public Property WindowHeight As Double

Property Value


The height of a window that directly hosts a Page.


The following example shows how to set the height of a window from a page.



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

If a Page is hosted by a Frame, setting WindowHeight has no effect, but you can still get the value of WindowHeight.

A Page in an XAML browser application (XBAP) can only use WindowHeight to change the height of Windows Internet Explorer; the height cannot be changed by setting Height, MinHeight, or MaxHeight.

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

Applies to