Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WinUI 3 platform #2513

Open
cwensley opened this issue Jul 4, 2023 · 10 comments
Open

Add WinUI 3 platform #2513

cwensley opened this issue Jul 4, 2023 · 10 comments
Milestone

Comments

@cwensley
Copy link
Member

cwensley commented Jul 4, 2023

Windows appears to be moving over to WinUI 3 as the "modern" way to build apps, and touts this as the framework they use to build Windows components. It would be nice to have this as a more modern option than using WinForms or WPF, even though it is likely missing a lot of functionality that will be needed to make a fully rounded out platform in Eto.

@cwensley cwensley added this to the 2.x milestone Jul 4, 2023
@ghost
Copy link

ghost commented Aug 5, 2023

i seriously advise against this since winui 3 is very very slow and Microsoft doesn't care about its issues at all, its the sole reason i moved to linux.

@nvella
Copy link

nvella commented Aug 7, 2023

WinUI would be a 'nice to have', but in my eyes is not mature enough, nor appropriately provides enterprise/commercial application developers with the ulilitarian controls, visual styling, or flexibility of WinForms and WPF; WinUI suits only certain use-cases, and those don't tend to be thick desktop apps which I've found Eto exceptional for. Personally, I wish MS would take a page out of Apple's book and iterate, not overhaul.

@alexvinidiktov
Copy link

Eto.Forms apps with WPF and Windows.Forms backends look very dated. I would love to have WinUI 3 as an additional backend.

Is any work being done on this issue?

If not how would one start implementing WinUI support?

@cwensley
Copy link
Member Author

cwensley commented May 16, 2024

With WPF you can create a modern theme but it takes a lot of effort.

Creating a WinUI 3 platform is certainly a lot more effort, but in case someone like yourself would want to take that on I've created a bare bones platform that can create a Form with a Label on it here: #2652

I'll see what I can do to get that merged in soon so I can start accepting pull requests filling out more of its functionality.

@alexvinidiktov
Copy link

I'll see what I can do to get that merged in soon so I can start accepting pull requests filling out more of its functionality.
That's awesome! I hope it will get merged soon.

@cwensley
Copy link
Member Author

Ok it's merged! I've also added a bare-bones implementation of TableLayoutHandler to get things started a bit quicker.

My plan for WinUI is to utilize the MeasureOverride and ArrangeOverride as much as possible instead of doing what is in WPF where it sets minimum sizes, though perhaps this isn't feasible. Either way, we can start filling out the other controls now and once we get the basics in we can utilize the Eto.Test UI.

@ris-work
Copy link

I would love to have WinUI 3 support too. I think that this might be the one that could land in browser / WASM support for Eto.forms through platform.uno's support for WASM. Platform.uno implements WASM support for WinUI3 and it is somewhat much faster than the others (Avalonia) as it renders them (AFAIK) as native HTML elements where possible!

Platform.Uno also supports drawing directly to framebuffer too (platforms without a WM or compositor).

@alexvinidiktov
Copy link

alexvinidiktov commented Jul 28, 2024

Ok it's merged! I've also added a bare-bones implementation of TableLayoutHandler to get things started a bit quicker.

My plan for WinUI is to utilize the MeasureOverride and ArrangeOverride as much as possible instead of doing what is in WPF where it sets minimum sizes, though perhaps this isn't feasible. Either way, we can start filling out the other controls now and once we get the basics in we can utilize the Eto.Test UI.

Great news!

I see there's another open PR with more controls.

I'll like to help flesh them out. Could you give some guidance?

@cwensley
Copy link
Member Author

I see there's another open PR with more controls.

I'll like to help flesh them out. Could you give some guidance?

Thanks for the offer! I'm trying to get at least the minimal test app working so we can work on each of the sections. There's a bunch of work needed on the TableLayout so it works as expected then it can be merged. I have been thinking of implementing part of PR #556 for WinUI instead of implementing all the hacks that were needed for WPF, I'm not sure which one is easier at this point, it's just a matter of getting some time to do it.

After that, anyone could just start picking controls and implementing them.

@ris-work
Copy link

I think #1936 is relevant here, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants