Iam trying with a simple test UWP app which is having a UWP webview2 control , noticed an issue where in the extended monitor , if i minimize the app and restore the app , the webview control shrinks in size. Please see the attachment But if i resize the main window then the control docks properly.
I tried using Grid instead of frame , still the issue exists. Any ideas to fix this issue. I guess this is something to do with DPI and not sure how it can be done within UWP webview2.
Primary display is set with 1920X1080 resolution and scale of 125% and the Extended monitor is set with same resolution and scale of 100% (windows recommended).
Below is the sample code.
<Grid> <Grid.RowDefinitions> <RowDefinition Height="*"></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefinitions> <Frame Grid.Row="0" Grid.Column ="0" Margin="5 5 5 5" > <xamlcontrols:WebView2 x:Name="WebView2" Source="https://learn.microsoft.com/en-us/microsoft-edge/webview2/" /> </Frame> </Grid>