18 ms·
Avalonia – A multi-platform .NET UI framework
- jsingleton 10y agoInteresting, .NET Core doesn't have a good UI story yet. It's just console / web for now. Something like WPF but cross-platform would be great and this looks promising.
- c-smile 10y agoMy Sciter Engine [1] with C# wrappers [2] for .NET and Mono is on par with WPF[3]. It just uses HTML and CSS instead of that XAML thing. [1] http://sciter.com http://sciter.com [2] http://www.codeproject.com/Articles/1057199/Sciter-HTML-Csharp-based-desktop-apps-walkthrough http://www.codeproject.com/Articles/1057199/Sciter-HTML-Csha... [3] http://sciter.com/sciter/sciter-vs-wpf/ http://sciter.com/sciter/sciter-vs-wpf/
- int_19h 10y agoI'm sorry, but in terms of convenience and flexibility of desktop UI development, HTML/CSS/JS is simply not the same thing as WPF. HTML is ultimately still a document markup language originating in a stateless environment, and it shows.
- c-smile 10y agoStandard HTML5 is quite limited in terms of UI, yes. But in Sciter you can define even windows as HTML. Check this: http://sciter.com/images/sciter-clock.png http://sciter.com/images/sciter-clock.png, this is HTML and CSS[1]. Can you do that in browser or even in WPF? I've also introduced <popup> element that allows to render DOM elements as popups outside HTML canvas (in separate windows) : http://terrainformatica.com/w3/sciter-tooltip.png http://terrainformatica.com/w3/sciter-tooltip.png Yet all screenshots on http://sciter.com http://sciter.com are HTML/CSS as they use Sciter for the UI. Essentially all AV vendors. Only Kaspersky AFAIK uses WPF. [1] http://www.codeproject.com/Articles/859098/Sciter-multiplatform-embeddable-HTML-CSS-scripting http://www.codeproject.com/Articles/859098/Sciter-multiplatf...
- pikzen 10y ago>Essentially all AV vendors. Not sure that's an especially good thing to be proud of :> Joking aside, I'm not sure I see your point with that clock. Windows with transparent elements? We've been able to do that for quite a while now. If you're referring to drawing that clock, I can use GDI on Windows and have the same result. With a bit of creativity you could probably have the hands rotate automatically with a binding, but my WPF is much too rusty for that.
- c-smile 10y ago"I can use GDI on Windows and have the same result." Sorry but you should refresh your GDI knowledge (if it makes sense these days at all). You simply cannot render that with GDI. GDI does not know anything about a) antialiasing nor b) it knows anything about alpha-channel. The only function that is available to you is ::AlphaBlend that is not even in GDI API but from msimg32.dll. And that function takes a bitmap. So you need some primitives to rasterize things like canvas.lineTo(point1, point2) with AA. And for GDI to do that on CPU side. And CPU based rendering with modern 4K displays (Retina grade displays) makes no sense - on 192 DPI screen you need to produce 4 (four) times more pixels than on used to be standard 96 DPI displays. Our processors haven't grown that far in last 5-10 years. So forget about GDI, its time is over. So if to think not just in yesterday's terms then the only option are GPU based renderers based on DirectX, Vulcan, Metal and OpenGL as a last resort. Starting any projects today that relies on CPU based rasterization - pure waste of time - no present and no future.
- DaiPlusPlus 10y agoIt's sad. I wish Microsoft had improved and advanced GDI instead of starting anew with WPF (now Jupiter) such that we had a 2D UI toolkit suitable for the modern world instead of multiple competing, but only partially overlapping, frameworks (e.g. WPF is useless if you're doing native C++ and, but GDI lacks intuitive modern graphics features). What strikes me is how Microsoft removed 2D hardware acceleration from GDI+ in Vista (wrecking performance, hence the shitty XOR operation framerate) and then introduced Direct2D without providing a clear upgrade path for developers. What also sucks is that GDI and Win32 are so heavily intertwined it means that other frameworks (like WPF, Direct2D, etc) cannot integrate as well.
- joshburgess 10y agoHave you seen the things people have built with Electron? I wouldn't underestimate the capabilities of HTML/CSS/JS for desktop apps when you have projects like Slack, Atom, Visual Studio Code, GitKraken, the Brave browser, etc. all using Electron to build their desktop apps.
- spriggan3 10y ago> Have you seen the things people have built with Electron? Yes and they are slow, memory hungry and often crash for no reason. A javascript+HTML UI just can't compete with an app written in C# and WPF in term of performances.
- MichaelGG 10y agoHave you seen the things people have built with PHP? Or works of art made with chisels? :) Tooling can suck and be annoying to use, require enormous resources, etc., while still producing a result people like. We shouldn't confuse the two issues. The result is probably only relevant for true questions of "is it possible", as in "is it possible to write a fast-enough OS kernel in C#".
- Razengan 10y agoThey definitely feel clunkier to use though, if for nothing else but a noticeably less-responsive UI compared to apps using native controls etc.
- int_19h 10y agoAbsolutely. My point is not from user's perspective here, but rather as a developer. WPF has its warts, but it's still a great framework specifically for desktop UI - because it was designed for that from ground up. Doing the same things in HTML/CSS/JS is definitely possible, but requires a great deal more effort. If you want an analogy, it's kinda like writing web apps in C. Sure, you can do it, but there are much better tools.
- revelation 10y agoThat's a table of various uninteresting factoids, not a comparison.
- oblio 10y agoDoes anyone have any war stories with Eto (https://github.com/picoe/Eto https://github.com/picoe/Eto)? It is a .NET cross platform toolkit similar in concept to Wx (it wraps native widgets).
- lubos 10y agoI've been using Eto for a few years. It's amazing toolkit. If anyone is working on cross-platform desktop app in C# which is meant to look "native" on each platform, then Eto is the best toolkit there is.
- grokys 10y agoYep, I agree - Eto is great for native controls! I consider Eto and Avalonia to complement each other rather than as competitors.
- zem 10y agoi tried using eto for a personal project, but i had to abandon it because i ran into a problem that i couldn't solve myself, and which got zero responses on the forum :( https://groups.google.com/forum/#!topic/eto-forms/8tivDpoC3Ic https://groups.google.com/forum/#!topic/eto-forms/8tivDpoC3I...
- grokys 10y agoHi all, I'm the originator of this project and the main contributor, please ask anything you like! Though this did have to hit front page when I'm doing a day of travel didn't it? :)
- heinbau 10y agoAnything around graphing yet? Or Is that still something that I would need to roll with SyncFusion, Telerik or something similar.
- grokys 10y agoNo not currently - were still working on the core at the moment, though I think we're just about ready for it now if anyone was interested in starting on it.
- govert 10y agoMaybe Avalonia support can be added to OxyPlot (https://github.com/oxyplot/oxyplot/tree/develop/Source https://github.com/oxyplot/oxyplot/tree/develop/Source). It's already portable with a bunch of rendering targets.
- yodon 10y agoAny chance you plan on supporting UI's for Unity3d?
- grokys 10y agoNot really thought about unity in particular, but we do have game ui as a potential use-case.
- johnhattan 10y agoWould this potentially work with Monogame, as that's built on the same framework?
- jbeda 10y agoAvalon was the original codename for WPF. It is a great example of what you get when people vote on codenames.
- wmccullough 10y agoPardon my language, but fuck yea! Been waiting to see something like this happen
- dotnetisnotdead 10y agoWow, this could be the start of something big. Not often you see people working on desktop UIs anymore, and this of course being cross platform as well... definitely going to watch this one. Looks great to me.
- s369610 10y agoLooks great. I looked at it in the past but was put off by the GPL3 license attached to omnixaml. It looks to be MIT licensed now.
- eggy 10y agoGood work! .NET could use this right now from what I've come up with. How could I work with F# on this? New to F# right now, and I would like to have a cross platform GUI. I have F# running on my iPad now (Continous App!).
- serge2k 10y agoFrom contribution guide > DO NOT USE #REGIONS full stop. Why is that?
- grokys 10y agoBecause I hate them. EDIT: Ok, I'll explain :) : because when I open a file, I want to see the code, not folded regions telling me that it has constructors, properties, and methods. That's not interesting to me, it just obfuscates. There used to be an argument for using them for generated code, but partial classes are a much better choice for that. #regions make me unreasonably irritated ;)
- deleted 10y ago[deleted]