Better HN
topnewbestaskshowjobs
Log inSign up

LemurMadness

4 karma · joined Nov 3, 2017 (9y ago) · 5 submissions

Submissions

comment 9y ago · link · parent

It looks like there's two options for cross-platform XAML UIs:

* Prism [1], which doesn't seem to support .NET Core. It was originally created by Microsoft Patterns & Practices, but then open sourced it. It's now community maintained. It looks like it's still being actively developed as there was a merge 4 days ago.

* Avalonia [2], which supports .NET Core but is still in alpha.

[1] https://github.com/PrismLibrary/Prism [2] https://github.com/AvaloniaUI/Avalonia

comment 9y ago · link · parent

I just spent some time working with Eto.Forms (based upon your recommendation, thanks!). It looks pretty nice and seems straight-forward. I also appreciate that it officially supports F# in addition to the regular C# and VB.NET.

Unfortunately, it doesn't support .NET Core/Standard yet. The lead dev, Curtis Wensley (@cwensley), is currently working on supporting it and said that he hopes to have to completed in time for the Eto 2.4 release, per their Gitter chat (https://gitter.im/picoe/Eto?at=59d65ab4177fb9fe7e41ff9e).

Another interesting detail is that Avalonia seems to be using Eto's parser implementation. And Eto is (will?) using AvaloniaUI's (the parent of Avalonia) monomac implementation.

comment 9y ago · link · parent

The main problem with Avalonia is that it's still in alpha. It looks like a good solution, though, so definitely something to keep an eye on if you're looking for a solution that doesn't require running a web server and render for the UI.

comment 9y ago · link · parent

I really like this approach, particularly since it allows a clean separation between the responsibilities of designing the UI and writing the back-end code. The UI designer can still wire up events and design them in Qt Creator (maybe using placeholder events?) but then the .NET dev can write the back-end stuff for it.

comment 9y ago · link · parent

That's good point.

But one big difference between Xwt and Xamarin Forms is that Xwt supports Linux via GTK (GTK1, GTK2 & GTK3) whereas Xamarin Forms does not.

Xamarin Forms also requires different code for different targets, such as:

   // Android
   Forms.Init(this, null);
   var androidFragment = new MyFormsPage().CreateFragment(this);
 
   // iOS
   Forms.Init()
   var iosViewController = new MyFormsPage().CreateViewController();
 
   // UWP
   Forms.Init(e);
   var uwpElement = new MyFormsPage().CreateFrameworkElement();