I have a WPF application, and define the window in XAML as maximized, and 1080x1920 (1080p vertical format):
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
x:Class="PLBCarousel.MainWindow"
x:Name="Window"
Width="1080" Height="1920" WindowStartupLocation="CenterScreen" WindowState="Maximized" KeyDown="Window_KeyDown">
When I run the application on a 1080w x 1920h display, with taskbar hidden, it starts maximized, but all the elements are misaligned, and watch window provides the following values:
System.Windows.SystemParameters.PrimaryScreenHeight 1536.0 double
System.Windows.SystemParameters.PrimaryScreenWidth 864.0 double
This application has displayed correctly on the same display in the past, but the screen was used as a secondary display, rather than primary.
Any ideas why this is happening? I think the above two values should resolve to 1920 and 1080 respectively.