Breyta

Deila með


Page.WindowHeight Property

Definition

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

public:
 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.

Examples

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

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="SetWindowHeightPage"
    WindowHeight="500"
    >
</Page>

Remarks

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 the browser; the height cannot be changed by setting Height, MinHeight, or MaxHeight.

For more information about XBAP support, see Frequently asked questions about WPF browser-hosted applications (XBAP).

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 Internet Explorer window to be less than 150 pixels.

Applies to