How to set the corner radius of webview2 in WPF Window
12:18 29 Jun 2021

In a Window of my WPF application, I have added a webview2 and trying to make its border rounded.



    

Setting the cornerRadius property of the Border did not help. Though the Border was rounded, the webview content was visible around the sharp corners.

I also tried setting the cornerRadius in the parent Window and clipping the content within the Window and also in the Border. Every time the container was rounded but the web content was visible around sharp edges.

So, is it possible to achieve the desired effect from the WPF client-side, and how to do this?

c# wpf webview2