Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

webview inside a listview

$
0
0

Hi, i have a listview whiwh item's template consists of a stackLayout composed of a label (title), an image (isRead) and a webview (the content).

When i tap on an item (the title, not the webview) the item gets selected. If i tap on the webview, the Command isn't executed and my item isn't selected.

What should i do to make it work ?

Note: I tried with TabGesture without success.

here is the code of my custom renderer :

public class WebViewRenderer : WebRenderer
{
        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.WebView> e)
        {
            base.OnElementChanged(e);
            if (Control != null)
            {
                Control.Focusable = false; // disable focus
                Control.SetBackgroundColor(new Android.Graphics.Color(0, 0, 0, 0)); // transparent background
            }
        }
}

thank you


Viewing all articles
Browse latest Browse all 58056

Trending Articles