How to: Set the Height of a Window from a Page
This example illustrates how to set the height of the window from a Page.
Example
A Page can set the height of its host window by setting WindowHeight. This property allows the Page to not have explicit knowledge of the type of window that hosts it.
Note
To set the height of a window using WindowHeight, a Page must be the child of a window.
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SetWindowHeightPage"
WindowHeight="500"
>
</Page>
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET Desktop feedback
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for