Hello,
Do you know the best approach how to set MAUI (mayby
WidthRequest
andHeightRequest
or) for FULL SCREEN of webview on any device?
You can add x:name for webview.
<WebView
BackgroundColor="Gray"
x:Name="myWebview"
>
Then you can get the screen's width and height in the background code, After it, you can set it to the Webview.
protected override void OnAppearing()
{
base.OnAppearing();
myWebview.WidthRequest=DeviceDisplay.MainDisplayInfo.Width;
myWebview.HeightRequest=DeviceDisplay.MainDisplayInfo.Height;
}
By the way, please keep one thread for one question, it will help others have similar issue to find answer quickly.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.