I added a WebView control to my .NET MAUI application and this control shall only be visible under certain conditions, e.g. the user wants to open a link.
My problem is that the WebView is always visible. What I have done in XAML is:
<WebView Source="{Binding Path=BrowserSource}"
IsVisible="{Binding Path=ShowBrowser}"
ZIndex="1000" />
The BrowserSource is the link to the website that shall be shown, and ShowBrowser is a Boolean property stating whether the WebView shall be visible or not. The BrowserSource property works as I can set the URL, but ShowBrowser seems to be ignored.
I tried setting the IsVisible property of the control to Collapse, Hidden, or False in XAML directly without using any binding, but it is always visible.
How do I properly toggle the visibility for my WebView control? My visibility settings for any other control seems to work just fine.
I am testing my code on a current physical iPhone device (iOS 18.5).