This project is read-only.

Is WriteableBitmapRenderExtensions.Render not supported for WebView Control

Sep 6, 2013 at 3:21 PM

In our app, we have a scenario where there is a webView control on the page and a popup should be displayed over the webView control. But due to "airspace problem", webView is overlapping with popup. Here we are not in a position to alter app design to use other controls instead of browser. So as a workaround we tried following:
    async void ShowPopupAsync()
        var fe = _webView as FrameworkElement;
        var bitmap = await WriteableBitmapRenderExtensions.Render(fe);

        _screenShotImage.Source = bitmap;
        _screenShotImage.Height = fe.ActualHeight;
        _screenShotImage.Width = fe.ActualWidth;

        _screenShotImage.Visibility = Visibility.Visible;
        fe.Visibility = Visibility.Collapsed;
        _popup.IsOpen = true;

    void DismissPopup()
        _webView.Visibility = Visibility.Visible;
        _screenShotImage.Visibility = Visibility.Collapsed;
        _popup.IsOpen = false;
But the issue here is rendered bitmap is always blanc. WriteableBitmapRenderExtensions.Render is not rendering WebView Control. Is there any fix for this or any workaround.

Your help will be highly appreciated.

Sep 6, 2013 at 5:41 PM
WriteableBitmapRenderExtensions don't support WebView, but you should use the WebViewBrush that comes with the base Windows Runtime.