unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.06k stars 735 forks source link

Blazor Hybrid #12582

Open scottkuhl opened 1 year ago

scottkuhl commented 1 year ago

What would you like to be added:

Support for the BlazorWebView control.

Why is this needed:

Blazor components can be used inline without running in Web Assembly.

For which Platform:

Anything else we need to know?

francoistanguay commented 1 year ago

Can I get a sense of wny you're interested in having this? For specific controls? Entire pages? This is something we'd like to explore further.

scottkuhl commented 1 year ago

Case 1:

This would allow the use of third party controls like Telerik and SyncFusion that don’t yet provide Uno support. SyncFusion for example has an excellent PDF control for Blazor that runs under hybrid. This would let the control run without the constraints of Web Assembly embedded in a WebView2 control.

Case 2:

To include existing Blazor components that have been written in house.

francoistanguay commented 1 year ago

Thanks for the quick feedback, this is exactly what we had in mind as well.

Have you thought/Are you worried about the fact that you'll need to "propagate/duplicate" all of your styling considerations between the native side and the Blazor side, ie Colors, Fonts, ...?

scottkuhl commented 1 year ago

I don’t really see any way around it for apps that have their own design unless Uno can style based on CSS.

At my company we have a custom design system created by a central group and they based in entirely on React. We have to duplicate a lot of it for Blazor even though it’s still CSS.

However, I can see a lot of Blazor components already being based on Material and to a lesser extent Fluid that should integrate nicely.