dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.1k stars 1.17k forks source link

When will wpf be cross-platform #3952

Closed BruceQiu1996 closed 7 months ago

BruceQiu1996 commented 3 years ago
thomasclaudiushuber commented 3 years ago

@BruceQiu1996 I don't think there is any intent to bring WPF cross-platform. It relies on underlying infrastructure, like MilCore and DirectX.

But there are solutions in the pipeline and solutions already ready today.

a) From Microsoft:

b) From Community/Open Source

If it's so super urgent, I recommend you to take a look at one of the open source projects mentioned above.

Note: This issue is a duplicate of #48 #2967 #3356.

ClosetBugSlayer commented 3 years ago

WPF is still literally the most powerful UI framework in existence. It deserves a renaissance and it'll get one. Wait till everyone discovers how easy MVVM is with C#9.

BruceQiu1996 commented 3 years ago

Oh thx for your comment.you give me some very strong advices. @thomasclaudiushuber

LeoYang06 commented 3 years ago

Because it can't be cross-platform, the company has to use qt for some projects, so it has to use C++ development, which is quite helpless.

chancezheng commented 3 years ago

Hope It will be cross-platform at .Net 6.0

ccarlo88 commented 3 years ago

I've been investigating some options last weeks and found out quite a few very interesting options (for me, at least) and I hope this can help some more unsatisfied users with C# world lately. Have you ever heard about GTK? It is used for developing the whole Gnome desktop... You can use GTKBuilder together with the tool Glade, which is very similar to what we have in the XAML. Probably you are asking yourself "but how about the c#?". Well, good news for you! It supports quite a few programming languages including one which is called "Vala"! It is basically equal to C# (except for the conventions) and you have the advantage that it compiles to machine code, so no more runtime needed! If you want, of course, you can use C, Rust, Python, Perl, JavaScript or Vala!

Vala for C# programmers

No more need to get stuck in a single OS! Compile to whatever you need with the advantage of the speed!

the-black-wolf commented 3 years ago

Have you ever heard about GTK?

In the absence of WPF, we actually port most of Windows LoBs to Linux LoBs through C#/GTK (GTKSharp). It forces us to recode our UI but business and data goes unchanged. Its not comparable though, the level of visual features is just not the same, it would have been much better to have WPF ready.

JeViCo commented 1 year ago

It's 2023. Still not cross-platform

t9mike commented 1 year ago

Even if Microsoft decided to support Mac/other with WPF, using it over 3rd party options might not make sense. Would MS continually improve it over time? Would they abandon the project or radically redefine it? https://avaloniaui.net/ looks solid and has a great set of core developers continuing to improve it.

ccarlo88 commented 1 year ago

@JeViCo there's not even support for AOT compilation for UWP anymore (or Windows SDK as it is called now) like we had in the past. MSFT became just another Virtual Machine provider now (aka Cloud provider) 😆

robloo commented 1 year ago

For enterprise/business cases, as of today, WPF is effectively cross-platform using Avalonia UI as the base rendering/composition engine and platform abstraction layer. See:

https://avaloniaui.net/XPF

the-black-wolf commented 1 year ago

For enterprise/business cases, as of today, WPF is effectively cross-platform using Avalonia UI as the base rendering/composition engine and platform abstraction layer. See:

https://avaloniaui.net/XPF

That's not correct, we had this convo in another thread. There are several problems, especially with business/enterprise use:

  1. WPF is NOT Avalonia, and vice versa. They are not source or binary compatible. This is due to the choice Avalonia creators made early on to completely overhaul style system and make it more CSS like.
  2. As a consequence, NONE of the 3rd party WPF libraries (Infragistics, DevExpress, Telerik, etc) work in Avalonia

This is a major pain point of Avalonia in business LoBs and tools, as there is a pressing need for fully operational UIx elements such as advanced grids, charts, etc. It is not something you really wanna build yourself, and Avalonia crew seems too focused on their own small island to seem to want to do anything about it. IMHO, they should have long been in negotiations/consulting with 3rd party to extend/modify WPF stacks for Avalonia.

I am telling you this not because I think Avalonia is bad, on the contrary, we use it extensively, especially with the cold shoulder given by MS. But one needs to be realistic about it, many times the availability of features in Avalonia ecosystem hindered our product management due to client expectations.

robloo commented 1 year ago

@the-black-wolf You misunderstand. Avalonia the company now has two main products:

  1. Avalonia -- the original framework that is a complete re-implementation. And yes, it does many advanced things, more than WPF in most cases.
  2. Avalonia XPF -- A brand new product that runs WPF Xaml. They took WPF source and got it to work on top of Avalonia's rendering system. Please see fhe architecture diagram at the link I gave above. It absolutely is source compatible with WPF and even 3rd party DevExpress or Telerik controls.

Again, please read https://avaloniaui.net/XPF. It is cross-platform WPF. Source compatible.

the-black-wolf commented 1 year ago

@robloo oh, mea culpa. Didn't even know they were working on it. Well, there goes the rest of my week :)

maximilien-noal commented 11 months ago

Avalonia XPF is even binary compatible with WPF.

https://avaloniaui.net/Blog/wpf-for-linux-a-new-reality-with-avalonia-xpf

ClosetBugSlayer commented 11 months ago

Avalonia XPF is even binary compatible with WPF.

https://avaloniaui.net/Blog/wpf-for-linux-a-new-reality-with-avalonia-xpf

On top of MS giving lip service to WPF and intentionally putting people on it who can't work at full speed, the Avalonia squad screwed the community over twice:

  1. Avalonia UI makes changes nobody asked for that are incompatible with the universe of WPF code.
  2. Avalonia XPF is binary compatible but closed source and for a fee.

So now we have to fork the code yet another time. It's amazing how much institutional resistance there is to simply doing the right thing. WinUI needs all the sly tricks it can muster to keep up its fake reputation and hold off WPF at arm's length.

maximilien-noal commented 11 months ago

What an unfair comment.

First things first: Avalonia is OSS.

XPF is available for a fee because you are not entitled to people working for you for free.

ClosetBugSlayer commented 11 months ago

First things first: Avalonia is OSS.

Irrelevant. Its changes now categorize it as a different framework from WPF.

XPF is available for a fee because you are not entitled to people working for you for free.

Then don't show up positioning it as some kind of solution. We discuss free and open WPF source code here, not the latest money-making scheme from yet another mystery company with an occult logo.

maximilien-noal commented 11 months ago

It is a solution, whether you like it or not. It's source compatible, and binary compatible.

Irrelevant. Its changes now categorize it as a different framework from WPF.

You know nothing about development costs. Or else, you would not be throwing around things like "doing the right thing" and "changes nobody asked for".

Ask yourself the very reason why even Microsoft didn't make WPF cross platform. You might answer why

not the latest money-making scheme from yet another mystery company with an occult logo.

What a bunch of vile non-sense. You are definitely not worth my time.

ClosetBugSlayer commented 11 months ago

You know nothing about development costs. Or else, you would not be throwing around things like "doing the right thing" and "changes nobody asked for".

I know that classically good developers and good tools mitigate most development costs. But then you also have to fire all your SCRUM ninjas, UX crayon-scribblers, and useless bootcamp hordes. I can easily produce 50K lines of quality C# a year without giving up personal time. 99% of the software industry is deadweight tying down the other 1%.

Ask yourself the very reason why even Microsoft didn't make WPF cross platform. You might answer why

I'm asking myself why they bother with MAUI. I don't care about cross platform, Apple and Google/Linux are objectively inferior platforms that actively embrace anti-patterns just to be different and this leads to higher development costs. The only reason we bring up this term is because Microsoft curiously forfeited every future market it stood to win. Who is really pulling the strings here?

What a bunch of vile non-sense. You are definitely not worth my time.

I was worth your time for 3 posts, why stop now.

the-black-wolf commented 11 months ago

XPF is available for a fee because you are not entitled to people working for you for free.

While I fully agree with you, its an obvious cash grab with naive twist that big companies are bunches of suckers. Dont get me wrong, I love Avalonia and have major respect for its contributors, its my new favorite go to for desktop. And honestly I didn't even mind buying XPF to make our life easier, but the licensing is just too cost prohibitive. I tried to sell it to mgmt, but 10k per app, per platform (so we can continue utilizing Infragistics) is just too much. With 50 something LoBs at just one client, to add Linux and Mac to the lineup, that's a cool million bucks. It was a hard NO. Per app, per platform licensing is just not gonna cut it, especially in their intended target audience, the enterprise, which traditionally has tons of smaller LoB tools.

On topic: We abandoned Infragistics and continued porting to Avalonia UI, with the intended goal to be MS free by end of 2024. v11 made it all the more easier to shift focus for good, also allowed me to spend as little time in Windows as possible. In my startup we also ported our product to Avalonia (even though we still qualify for XPF Startup pricing, we have way better things to spend a 10k on, plus we want to be on AvaloniaUI anyway). I think the point of no return has been reached, MS may or may not make WPF cross-platform now, but it wont support 3rd party components it has now anyway, so meh. As passionate as I was before to have them live up to their BS cross-platform marketing, I simply don't care about them any more. They want to keep WPF Windows exclusive even if it kills it? Go for it, Champs. Stay the course.

robloo commented 11 months ago

its an obvious cash grab

It's not an obvious cash grab. As any new company, they are trying to find a fair market price that also sustains and grows the company. Of course they are going to start conservative (high price) and only bring prices down if they get volumes to sustain themselves. It takes time for the market to establish a price especially for a brand-new product. Besides, they are doing what Microsoft themselves said couldn't be done -- any price is fair when you need the "impossible" (an exaggeration but you get my point).

The best thing you can do is simply explain your situation to them and they can use that to refine their pricing models. It might never work for you... but then you have Avalonia itself which those same guys wrote for free. Note that I tend to agree with you that "per app" pricing is unfavorable in the long term for companies with lots of apps.

Also note that they just released a blog post about finances which is quite generous in terms of transparency: https://avaloniaui.net/Blog/balancing-growth-and-sustainability-avalonia-s-financial-evolution. While everyone has their own perspective, and you can feel it isn't fair. It will work for someone else and if not then Avalonia will lower the price. Simple demand driven economics will answer the question of a fair price and it only takes time.

ClosetBugSlayer commented 11 months ago

demand driven economics will answer the question of a fair price and it only takes time.

Demand driven economics don't exist anymore. It's become clear that Silicon Valley is one giant unified cartel with political ends, and that all startups are funded with the same money and given the same objectives as the large corporations. Open source WPF was a glimmer of hope but it's obvious what it's turned into.

robloo commented 11 months ago

@ClosetBugSlayer I can say confidently you don't know what you are talking about in the case of Avalonia. Of course they are allowed to make some mistakes (not saying they have in this case), learn and grow too. I won't say anymore on matter.

BruceQiu1996 commented 7 months ago

Thanks everybody