Reputation: 171
I have a simple WPF application with two xaml Pages. I'd like the app opening with the maximum size of the screen. I've found only answers about WPF Windows, but for Pages there is not a "WindowState" property.
Thanks a lot!
Upvotes: 16
Views: 13543
Reputation: 2626
In your Xaml window definition simply define:
WindowStartupLocation="CenterScreen" WindowState="Maximized"
Upvotes: 30
Reputation: 229
You could set the Width
and Height
property manually according to your current Screen Resolution from here
System.Windows.SystemParameters.PrimaryScreenWidth;
System.Windows.SystemParameters.PrimaryScreenHeight;
Upvotes: 1