Xamarin.Forms.WebView not showing

seanydaseanyda GBMember ✭✭✭✭✭

Right,

So declaring a web view like this -

WebView browser = new WebView
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand
            };

and then doing Content = browser; shows the web view just fine, But putting it in a StackLayout like this

StackLayout test = new StackLayout ();
            test.Children.Add (browser); 
            Content = browser;

and it won't show!! and I've tried putting fill and expand options on the StackLayout and it doesn't work either. I've tried with a Grid with no luck too. This is iOS and I have the NSTransportSecurity stuff in plist, The web view shows just doesn't show in a view for some reason....

Thanks

Answers

  • Try to do something like this:

    StackLayout test = new StackLayout ();

    test.Children.Add (browser);

    Content = test;

Sign In or Register to comment.