Is there a way to embed HTML+CSS as a control component? #15706
-
Hello everyone, I'm pretty new to Uno and I started seriously considering Uno over the Avalonia alternative simply because Uno provides a more polished experience, both from developer perspective and quality of output. Sorry if this question sounds silly, and I'll admit I didn't do enough research on the topic, but could you please tell me if it's possible to embed HTML+CSS overlays, perhaps as a control that I can declare in XAML with some basic properties such as alignment, opacity, which can have a transparent background ? I'm suspecting that the WebView2 control might be what I'm looking for, but I'm having difficulties making it work; EDIT: alright, after more testing I have learned that in fact WebView2 works with Uno for Windows, but not Skia.WPF, and when used it covers the entire client area, no matter what, so I'm guessing that there's no hope for having fine grained control over such a component. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You are right. At this time, we dont have WebView support for Skia and for WebAssembly. We should eventually be able to map WebView2 to an iFrame. Depending on which platform you run Skia (Windows, Mac or Linux), we should be able to tap into per-platform native web controls. More info: https://platform.uno/docs/articles/controls/WebView.html What platforms are you planning to target? |
Beta Was this translation helpful? Give feedback.
-
Hello @francoistanguay and thanks for the answer. Currently I am interested in WebAssembly and SkiaWPF. From what I've gathered so far, WebView2 covers the entire surface of the client once it's used, in the future it would be amazing to have control over the component (dimensions, position, transparency). |
Beta Was this translation helpful? Give feedback.
You are right. At this time, we dont have WebView support for Skia and for WebAssembly. We should eventually be able to map WebView2 to an iFrame.
Depending on which platform you run Skia (Windows, Mac or Linux), we should be able to tap into per-platform native web controls.
More info: https://platform.uno/docs/articles/controls/WebView.html
What platforms are you planning to target?