Search code examples
c#.netwpfxamluwp

WPF Screen padding and margin issue with scaling 150


I am creating a wpf application which have webview. I have used the dynamic binding to set width and height to webview. Here the issue is for all resolution webview is showing properly at any scaling factor except 150% . Screen is starting with gap starting from top . I have checked no where I have used any margin or padding still only for 150% scaling I am able to see the gap.

I tried to fetch the margin programmatically but I can see no margin and padding

Attaching the screenshots

Screen top at 100% and 125 % with any resolution : 100% / 125 %

Screen top at 150 %

the black screen is the gap , screen start should show white portion


Solution

  • If it is working for 100% and not for 150% then I think you are using the wrong dimension for your application. Make sure your minHeight is correct , for main windows and for webview page.

    I am sure for 100% the height is 1080 , but for 150% height will be near about 720 Make sure min height is set below 720