Elmish.Uno icon indicating copy to clipboard operation
Elmish.Uno copied to clipboard

Usablilty of this project and .NET 6?

Open shanoaice opened this issue 4 years ago • 9 comments

I really want to use Uno to create a graphical frontend of one of my cross-platform application, but it seemed like that there is no official support of F# in Uno platform. Is this project usable for now?

shanoaice avatar Oct 03 '21 13:10 shanoaice

@shanoaice, yesterday I was managed to run WinUI 3 app (Windows App SDK 1.0) on .NET 6 having Elmish.Uno library implemented completely in F#. So that you can call WinRT API from F#

xperiandri avatar Nov 19 '21 23:11 xperiandri

See https://github.com/xperiandri/Elmish.Uno/tree/uno_winui branch

xperiandri avatar Nov 19 '21 23:11 xperiandri

I'm going to issue a NuGet package and the solution template sometime later. On MyGet first

xperiandri avatar Nov 19 '21 23:11 xperiandri

@TysonMN some samples do not work or do not work as expected:

  1. Windows in UWP were created in a separate UI thread. Looks like in WinUI even though they are created using just new Window they still launch in a separate UI thread. So that double binding like in WPF will not be possible.
  2. Dialogs crash on customization. Probably some WinUI bug on .NET 6. I have not tried .NET 5
  3. EventBindingsAndBehaviors I have not tried to fix

Having that it looks much more close to what can be achieved in Elmish.WPF

xperiandri avatar Nov 19 '21 23:11 xperiandri

@TysonMN there are 3 new samples in Elmish.WPF: Sticky, Multiselect, Capabilities. Are any of them require v4? Or they can run on v3 too?

xperiandri avatar Nov 19 '21 23:11 xperiandri

Thanks! So, this means that after the WinUI branch gets released to the NuGet, I can start using it?

shanoaice avatar Nov 22 '21 13:11 shanoaice

The Capabilities same is the start of combining (almost) all samples into a single project as you previously suggested.

Sticky uses some new v4 API, but I think it can be simulated in user code on v3.

I don't remember what is in multiselect right now.

TysonMN avatar Nov 22 '21 14:11 TysonMN

@shanoaice, yes, I will give instructions

xperiandri avatar Nov 22 '21 14:11 xperiandri

@shanoaice use branch uno_winui as a reference: Put https://github.com/xperiandri/Elmish.Uno/blob/uno_winui/src/Templates/SolutionTemplate/nuget.config Use as a reference WinUI project https://github.com/xperiandri/Elmish.Uno/tree/uno_winui/src/Samples/Samples.Windows Use as a reference F# Elmish programs project https://github.com/xperiandri/Elmish.Uno/blob/uno_winui/src/Samples/Samples/Samples.fsproj

NuGet is here https://www.myget.org/feed/elmish_uno/package/nuget/Elmish.Uno.WinUI

Let me know if it works or not

xperiandri avatar Nov 28 '21 00:11 xperiandri