MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
431 stars 51 forks source link

Round corners #3588

Open Symbai opened 1 year ago

Symbai commented 1 year ago

In recent preview of Edge, the web content has round corners. I want to do the same in WPF but I cannot. The WebView2 control doesn't have CornerRadius attribute and wrapping a border around it doesn't work due to airspace issue (webview2 control is always rendered on top of anything else).

novac42 commented 1 year ago

@Symbai We are currently working on the design of WPF control overlay to address the airspace issue. Meanwhile could you please check if this workaround work for you? https://github.com/MicrosoftEdge/WebView2Feedback/issues/1509#issuecomment-1410977614

Symbai commented 1 year ago

The workaround does not work for me because although it adds (blurred) corners, it removes any "connections". For example you put WebView inside a grid cell. When you then change the window size using your mouse cursor the webview2 control will get bigger or smaller like it should. With the workaround you mention, the webview2 control will get a fixed size and no longer auto scale.

This needs a true WPF solution, not a "winapi/c++ hack".

https://github.com/MicrosoftEdge/WebView2Feedback/assets/14368203/08cbce41-a7fe-4ad6-82aa-6ea8b10f904c

Draugr-official commented 11 months ago

@Symbai We are currently working on the design of WPF control overlay to address the airspace issue. Meanwhile could you please check if this workaround work for you? #1509 (comment)

Curious, why havent this feature already been implimented? Unless theres many collisions internally, it should just be an "add-and-go" feature?

victorhuangwq commented 11 months ago

Hi @Draugr-official, I'm answering on a personal capacity. For this particular feature of rounded corners, there are two reasons why it's not an item that it is not a priority item: