6 ms·
AvaloniaUI: Create Multi-Platform Apps with .NET
- NicoJuicy 3y agoJust a mention: There's an active telegram channel from them. https://docs.avaloniaui.net/docs/community https://docs.avaloniaui.net/docs/community
- a1o 3y agoI need something like this but for Windows Forms instead.
- zzetao 3y agoEco is the problem with such cross-platform frameworks
- DANmode 3y agoElaborate.
- DavidKarlas 3y agoEco probably means ecosystem, which I assume it means lack of UI Controls like Maps view, Graph/Charts for visualizing data, Date pickers and other stuff they you can get from vibrant UI ecosystem. But I think some of this stuff is already handled in Avalonia ecosystem like https://github.com/Mapsui/Mapsui https://github.com/Mapsui/Mapsui, https://github.com/beto-rodriguez/LiveCharts2 https://github.com/beto-rodriguez/LiveCharts2 and few others...
- eyegor 3y agoSee also https://scottplot.net/ https://scottplot.net/ although it's not avalonia specific, it just has an avalonia option.
- zogrodea 3y agoDo you mean accessibility? I did notice disappointing non-native-like behaviours when I tried typing in an AvaloniaUI textbox but I'm hopeful they will manage to solve that and other issues. For example, pressing a space will always introduce a new item in the undo/redo history [0] which isn't how native textboxes work. [0] https://github.com/AvaloniaUI/Avalonia/blob/942901c624df73b75c1f3b97b7b5ff3a3f97c15a/src/Avalonia.Controls/TextBox.cs#L1476 https://github.com/AvaloniaUI/Avalonia/blob/942901c624df73b7...
- bastawhiz 3y agoAre there examples of high profile apps made with this?
- S04dKHzrKT 3y agoI think that depends on your definition of high profile. The site has a showcase link in the header and the big names that popped out to me were JetBrains and GitHub. > JetBrains Rider > JetBrains uses Avalonia UI to enable DotMemory and DotTrace to run within Rider, their cross-platform IDE. > Git Credential Manager > Developed by GitHub, Git Credential Manager is a universal solution for Git authentication. https://www.avaloniaui.net/Showcase https://www.avaloniaui.net/Showcase
- lesbaker 3y agoThe Mesen multi-console-system emulator (https://mesen.ca https://mesen.ca) Not affiliated; just a satisfied user.
- nubinetwork 3y ago90% of its debugger hangs/crashes/jank are due to dotnet.
- pjmlp 3y agoDue to .NET or the abilities of its developers?
- nubinetwork 3y agoI'm sure it works fine on windows, but to be completely honest I haven't tested as I haven't used windows as a desktop for 20 years.
- singhrac 3y agoI think Ryujinx is made with Avalonia, though I might be wrong. Not sure it’s high profile.
- 3y ago
- siwatanejo 3y agoIn hindsight, I should have adopted used this in the past for the apps of my startup, instead of going for the Xamarin.Forms route. Why do I say this? Because the migration from Xamarin.Forms to MAUI was (actually, _is_, as it's not really 100% finished yet) a horrible PITA. Let alone the migration from .NETFramework to .NETCore (now called "dotnet" since v5) which delayed us months if not years (but people that used Avalonia would be affected by this too; so the way to dodge all this would have been choosing Flutter or ReactNative, I guess). That being said, the main reason why I chose Xamarin.Forms over Avalonia at the time is because the latter didn't have Mobile support. How's Avalonia's mobile support now? Even if the port is 100% complete, I always thought "well, XF/Maui are centered around mobile, making desktop just be an after-thought", which to me is an advantage because I prefer better UX for mobile by default, and require devs to spend extra effort for desktop support (instead of the other way around); given that desktop usage of apps is declining day by day.
- jeroenhd 3y agoI've only ever seen mobile mentioned as "coming soon", but honestly, I don't think porting over the GUI library will make turning an application into a mobile one any easier. A mouse+keyboard design just doesn't fit a mobile screen well, you're going to need to redesign and reimplement large parts of your application regardless of what platform you pick. You'll probably get tablets working easily, but for mobile phones you'll need to put in the annoying grunt work. I do like Avalonia for actually bringing a cross-platform .NET GUI to Linux and for that purpose it works quite well. I'm sure the toolkit will end up working fine for mobile just fine, as long as you design your application for the different form factors you may end up running on. Porting Xamarin Forms to Avalonia is going to be a hell of a lot easier than porting it to Flutter or React Native, but you'll still end up putting significant effort into the process if you want it to succeed. Avalonia's big money-maker is their drop-in replacement platform for WPF, which allows you to basically take an old WPF application and turn it into a Windows/macOS/Linux/web application with two lines of code, if you're willing to pay the price. Perhaps they'll add some kind of auto-mobile-form-factor conversion to that system as well?
- siwatanejo 3y ago
- CharlesW 3y agoI just learned about this today, and this (from the FAQ) helped me understand how to think about it: "Avalonia is akin to Flutter for .NET, both using Skia for UI rendering. Key differences include Avalonia's use of .NET and XAML, contrasting with Flutter's Dart language. While Flutter excels in mobile, Avalonia has recently expanded to mobile, offering a more mature desktop experience. For teams skilled in .NET and XAML, Avalonia is likely the better fit." So this might be a great choice if you're a .NET shop, if your app doesn't need a platform-native native look or feel, and if your project is desktop-focused.
- fxtentacle 3y agoI have yet to find any fast UI framework that uses Skia. It seems it's great for mostly static pages (like old style HTML) but as soon as you do animations and desktop resolutions, Skia's CPU rendering will fall apart. Case in point, none of the Flutter examples are smooth on my 4K laptop. But I can play Assassin's Creed Mirage (released a few months ago) just fine at 70+ fps. Edit: And my Android phone also can't handle scrolling up in this Flutter demo app without severe stuttering: https://play.google.com/store/apps/details?id=com.gskinner.flutter.wonders https://play.google.com/store/apps/details?id=com.gskinner.f... My understanding is that rendering large text blocks with Skia will max out the CPU. So they would need to chunk the content of the div inside the scroll container, like what Chrome does.
- zogrodea 3y agoWould be curious to see an example of what you consider a fast UI. (I hear Skia is faster than most alternatives like Cairo, so your statement makes me think that rendering 2D UIs is just slow in general.) Last time I tried Avalonia UI on Mac, the CPU usage was really high (like in the 70s sometimes without doing anything). They might have addressed that since then though.
- fxtentacle 3y agoSadly commercial and subscription, but seriously fast on pretty much any platform. Used in Baldurs Gate 3 and other AAA games. https://www.noesisengine.com/xamltoy/61c071a0b3a34ff82dfb0e2b96e30f94 https://www.noesisengine.com/xamltoy/61c071a0b3a34ff82dfb0e2... "rendering 2D UIs is just slow in general" I think mostly it's just that many existing tools use CPU rendering. Without "modern" pixel shaders, crisp anti-aliased text rendering was pretty much impossible on GPU. At 800x600, rendering the UI on CPU used to be no problem. But with retina and high-DPI it became 4x slower and, thereby, unusable. And yes, that high CPU usage is exactly the issue with Skia. Ideally, it should require a few percent on load and then afterwards everything should be running inside the GPU at almost 0% CPU cost.
- kumarvvr 3y agoAnyone using this in production? Is there any catch? Site says its opensource. Are there any loopholes or critical choke points that necessitate shifting to something paid?
- Rohansi 3y agoPlastic SCM uses it
- sandermvanvliet 3y agoSo perhaps not “production” in the terms you’re thinking of but I’ve built https://roadcaptain.nl https://roadcaptain.nl with AvaloniaUI and I’ve been pretty happy with both the results as well as the developer experience. One of my requirements was a cross platform UI framework _for desktop_ as I target Windows, Linux and macOS. Look and feel is totally custom and not using native elements by choice. So if you’re looking to do that AvaloniaUI might not be what you want
- JaggerJo 3y agoWe use it in production for a bunch of apps. Has been great so far. The core team is approachable and really cares.
- sltr 3y agoProduction user here. I've found no money "gotchas". They're above reproach. In fact, I've received considerable free support from their devs on GitHub Issues [1]. The Avalonia business model is based on selling XPF, which runs WPF (Windows-only) apps on other platforms. That's very interesting to big corps with existing codebases. See my comment [2] [1] https://github.com/AvaloniaUI/Avalonia/issues https://github.com/AvaloniaUI/Avalonia/issues [2] https://news.ycombinator.com/item?id=39246988#39249128 https://news.ycombinator.com/item?id=39246988#39249128
- MikeCodesDotNET 3y agoTo name a few: Schneider Electric, JetBrains, GitHub, Datadog, AMD, KLM, Moodys Analytics and tons more. There’s no catch. The project is OSS (MIT license) and has been since the projects inception over a decade ago. There isn’t a paid version of Avalonia at all, so no gatekeeping of features. We instead generate revenue from support agreements, development services and selling our cross-platform fork of WPF. You can read a little more about it on our blog: https://avaloniaui.net/Blog/balancing-growth-and-sustainability-avalonia-s-financial-evolution https://avaloniaui.net/Blog/balancing-growth-and-sustainabil...
- pregnenolone 3y agoI've tried it and didn't like it at all. It's a memory hog, start-up times are horrendous, I've had lots of glitches on MacOS and I detest XAML. Overall it really feels like yet another alpha state product. Besides, I'm not really keen on using Microsoft products. Right now I have big hopes for Iced on Rust.
- osigurdson 3y agoMS Teams devs obviously feel the same as they didn't bother using any of this stuff (Maui, Avalonia, Xamarin). I get the sense the Microsoft groups developing these technologies are suffering from MIC (Manager is Customer) syndrome.
- marwis 3y agoAvalonia is not made by Microsoft.
- JaggerJo 3y agoWhen did you try it? We use Avalonia for our Product and honestly couldn’t be happier.
- pregnenolone 3y ago>When did you try it? Not even 3 months ago. >We use Avalonia for our Product and honestly couldn’t be happier. What do you mean "couldn't be happier"? Start-up times and memory consumption are objectively bad. Also something someone else already mentioned in here: font rendering just feels really off.
- feverzsj 3y agoThere are tons of cross platform GUI toolkits, but only Qt makes text rendering right.
- sltr 3y agoCitation? Not sure what's wrong with text rendering in the tens or hundreds of GUI toolkits that are not Qt.
- goenning 3y agoSite is dead? Browser is working CloudFlare is working Host error
- osigurdson 3y agoIf I was CloudFlare, this is the page I would show as well when my systems are down.
- RyeCombinator 3y agoLooks like the site got hugged hard by hn
- maxlin 3y agoaand the sites borked. Going to check this later. Have heard good things and really like using C# anywhere possible. C++, python etc have so massive compromises for just enjoyable development and good results.
- MikeCodesDotNET 3y agoSite should be fixed now.
- tkubacki 3y agoWell Dart as language is better than C# and Flutter is way more matured. This is only interesting for Microsoft shops
- notpushkin 3y agoA friend of mine is working on this. Personally I'm not too involved with .NET crowd but looks pretty neat from what I've seen!
- sltr 3y agoI can speak in favor of Avalonia from experience [1] for exactly this use case: - You want to target Windows, macOS, Linux, Android, iOS, and browser from one codebase. - You've already decided to use .NET / XAML. (So you're not comparing to e.g. Flutter) I chose Avalonia over the alternatives [2] that also match this criteria. It's been a good experience, and I'm overall happy with the app. The solution template "just works" on all platforms, and iteration from it to my finished app was straightforward. I found libraries for everything, whether Avalonia-specific or just .NET. The Avalonia community is active, and the devs are responsive on GitHub. Avalonia as a company will be around as they have a strong business model selling XPF. Some downsides are: - Mobile is not as polished. Avalonia started on desktop and expanded to other platforms. Some controls feel awkward on mobile, because they were originally for desktop. Example: TextBox. If Mobile is your primary concern, consider Uno or Xamarin [2]. - The "non-native controls" approach has pros and cons. Your controls render the same everywhere, but they can feel out of place, depending on your styling. For example, buttons in my app don't look like iOS buttons, which Apple cares about a lot. However, my users already familiar with the look on Windows or Android can easily use the app on iOS and vice-versa. - Build times for mobile and web are slow. I mostly edit-compile-debug on desktop and then smoke test on other platforms. - You still have the usual deployment and distribution challenges for each platform: desktop installers; macOS requires notarization; iOS requires App Store review. For most of that, Avalonia has excellent docs [3] and there are supporting libraries [4]. [1] I created FitEdit. https://github.com/endurabyte/FitEdit/ https://github.com/endurabyte/FitEdit/ [2] https://github.com/robloo/PublicDocs/blob/master/XAMLFrameworkComparison.md https://github.com/robloo/PublicDocs/blob/master/XAMLFramewo... [3] https://docs.avaloniaui.net/ https://docs.avaloniaui.net/ [4] https://github.com/velopack/velopack https://github.com/velopack/velopack
- josteink 3y agoAs someone with a good grasp of WPF who intends to rewrite an existing desktop C# WinForms (windows only) application to Avalonia, with the express goal of having a single, cross-platform codebase for (at least) Windows and MacOS… Does anyone have any experiences on doing something similar? Are there any non-obvious pitfalls one risk falling into one should consider upfront? Any advice appreciated.
- okbloomer 3y agoI am in the process of writing an Avalonia app now and one thing to consider is the controls that you will need. WinForms has a lot available and Avalonia’s coverage isn’t as broad. Hoping it improves over time. Other than that, if you know WPF I think you will enjoy the experience. It has been fun for me so far and I would encourage others to try it out.
- sltr 3y agoWPF and Xamarin dev here who wrote a new (not ported) codebase on Avalonia. - Avalonia has a guide just for people like you and me [1]. - Avalonia's flavor of XAML has small divergences from WPF that will have you hitting their docs often. There are some nice quality-of-life improvements, for example you can bind a Button click handler directly to a method without ICommand. The major concepts are the same e.g. data binding, dependency properties. - Coming from WPF, it's possible you've used MVVM and dependency injection. You'd be going against a strong cultural grain to not use them in Avalonia. But I would be surprised if your WinForms app is architected like that, so it may be a design challenge extracting coherent ViewModels and properties from the ball of mud that many WinForms apps become. - For macOS, read up on notarization [2] and, if you're publishing to the Mac App Store, the review process. - I recommend starting with example apps (look in the Showcase) or with the Avalonia template solution which just runs out of the box. - The Avalonia team iterates quickly. Expect to upgrade NuGets frequently, and don't get too far behind. There was recently a big jump from version 10 to 11. Good for you for starting after that. - Not Avalonia specifically but if you're not used to .NET Core check out #nullable enable. Can't live without it now, but was confusing at first. - Be sure to check out all of the official and community libraries [3]. I bet my design big on `ReactiveUI` and it's gone well. [1] https://docs.avaloniaui.net/docs/get-started/wpf/ https://docs.avaloniaui.net/docs/get-started/wpf/ [2] https://docs.avaloniaui.net/docs/deployment/macOS https://docs.avaloniaui.net/docs/deployment/macOS [3] https://github.com/AvaloniaCommunity/awesome-avalonia https://github.com/AvaloniaCommunity/awesome-avalonia
- williamcotton 3y agoDoes anyone know if all of the features described in the posting are available with Avalonia FuncUI, that is, does this support F# development?
- zogrodea 3y ago@JaggerJo who started FuncUI replied to this very thread. Hopefully he will see your comment and be able to answer.
- JaggerJo 3y agoDepends on what you mean by "all the features". In general Avalonia UI is a .NET library, so you can use it from any .NET language. If you have questions about specific features I can give a more detailed answer. https://github.com/fsprojects/Avalonia.FuncUI https://github.com/fsprojects/Avalonia.FuncUI
- theyeenzbeanz 3y agoThis seems like a perfect framework to use for embedded SCADA/HMI systems. I’ve been debating home brewing my own system but this should be a great replacement.
- JaggerJo 3y agoWe are using Avalonia for embedded devices.
- mrcsharp 3y agoAvaloniaUI when coupled with AOT compilation that is shipped as part of newer versions of .Net gives amazing results in terms of performance. My experience with it has been great so far.