Render Fuse Element on top of WebView?

I’m trying to use a Rectangle set to Overlay to functionally “fade away” some WebView content while a sidebar is active. However, it seems that the WebView is being rendered on top of everything.

The following is drastically simplified:

<Panel>
    <Rectangle Layer="Overlay" Fill="#000" Width="100%" Height="100%" Opacity="0.5" />
    <Panel>
        <NativeViewHost>
            <WebView />
        </NativeViewHost>
    </Panel>
</Panel>

In this case, the Rectangle is not visible and it seems like it should be.

Is there something I can do to get the WebView to allow the Rectangle to be drawn over it? Or do I need to inject some HTML into the WebView to mimic the effect?

I’m fairly certain drawing elements on top of native elements isn’t something that’s supported right now, but I could be wrong. The main reasoning behind this is when native elements render, we don’t necessarily have control of the surfaces etc they’re rendering to, and many native components rely on having direct access to the GPU to render their content.

I am having the same issue, is there a workaround?

Hi!

The NativeViewHost represents a new layer that cannot be mixed with GL graphics.

However, you can put other stuff inside the NativeViewHost:

<NativeViewHost>
    <Panel>
        <Text>Hi! I'm on top of the WebView</Text>
        <WebView />
    </Panel>
</NativeViewHost>

You can also use a GraphicsView inside the NativeViewHost to create another GL layer, however note that this can lead to performance trouble.

Worked like a charm. Thank you very much!

Hi Anders, I am implementing a chat application using fuse. For that, I am using two users as customer and agent. The agent is wishing to send HTML elements like buttons to the customer with texts. can I use the WebView for include all the chat content or is there any way to do so?

@Freak: don’t hijack old threads, make your own new posts.

Also, your question is far too generic to provide a sensible answer, please be more specific (in a new forum post).