Forum General

XLabs HybridWebView with transparent background

RainerGonzalezRainerGonzalez USMember ✭✭


I tried to override the OnElementChanged method on a custom renderer that inherit from HybridWebViewRenderer, in order to make transparent the background of my XLabs HybridWebView. It doesn't work, because the parent's method has not been marked as virtual. How can I make my HybridWebView transparent? This is my code:

[assembly: ExportRenderer (typeof (CustomHybridWebView), typeof (CustomHybridWebViewRenderer))]
namespace MyApp.iOS
    public class CustomHybridWebViewRenderer : HybridWebViewRenderer
        protected override void OnElementChanged(VisualElementChangedEventArgs e)
            this.Opaque = false;
            this.BackgroundColor = UIColor.Clear;


Sign In or Register to comment.