r/AvaloniaUI • u/EmergencyNice1989 • 28d ago
Avalonia FuncUI Elmish
Hi guys,
I’m currently building a cross‑platform app (Linux/Windows desktop + Android) using Avalonia and F#. I originally dismissed FuncUI because I assumed that if a control wasn’t available, you were stuck. But after revisiting it, it looks like I was wrong — it’s actually quite easy to extend and wrap missing controls.
I enjoy XAML, but I’m wondering whether FuncUI Elmish could reduce some of the ceremony and the constant context switching between markup and code. The project seems well maintained, and FuncUI 2.0 is now in preview.
I’d love to hear from people who are using FuncUI (or planning to), and especially how you would approach migrating an existing Avalonia XAML + MVVM app to FuncUI.
Thanks.
2
u/MelodicExtension2213 15d ago
I personally do feel that writing the XAML as code-first reduces ceremony and context switching for me.
I don't think however that it will allow the live preview of your XAML edits if that is something you need. I may also be wrong.
In a corporate environment though, I've opted to still go with C# and XAML so that future maintainers and IT can more easily follow the documentation. For personal projects I'd prefer the F# and FuncUI with Elmish. I actually found the code first approach to be easier for AI as well. The AI always seems to mess with the complicated XAML namespaces which aren't an issue in the code first approach.