WPF, window doesn't open with specified resolution
I have a button in my WPF project that opens a different window. Window should be 640x480 but when it opens by pressing the button it has the resolution of 800x600. I tried to set the resolution in the window xaml and code behind before opening the window. Window only has an image which resolution is also set to 640x480.
7 Replies
the xaml of the window that should be 640x480 but isn't
i also noticed that when i set the window resolution to 100x100 in xaml, it becomes 125x125 when opened
your desktop is likely set to 125% scale
yes it is.......
well, can i somehow force it to always be a specified resolution regardless of desktop scale?
possibly, but that's a bad idea
indeed it is
your app would have different sizes on different scales, things could easily be misaligned
how come that the main window that is 500 wide is actually 500 wide?
scale doesn't affect it it seems
anyway, thank you for figuring it out for me