5 ms·
Interesting, .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 pr
by jsingleton 10y ago
Interesting, .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.