MvvmDialogs for Avalonia #7130
Replies: 4 comments 2 replies
-
Great work! Dialogs is certainly an area I would like to see improvement on in Avalonia. |
Beta Was this translation helpful? Give feedback.
-
That library makes it sweet and simple. I can't understand that someone would write an application without it. I still need to port the Demos to Avalonia. "Some" of the WPF demos (.NET Core) are working, others still need fixing to compile. With a bit more work, it can support WPF, Avalonia, UWP, WinUI3 and Blazor -- any MVVM application needs that. From my part I'll just focus on Avalonia. |
Beta Was this translation helpful? Give feedback.
-
I've created the first 2 demos. Here's a sample ViewModel to show and close another window. The part that's bogging me, however, is class registration with ReactiveUI/Splat. Could someone enlighten me on this one? Instead of declaring the usual
It's asking me to create the object myself with all constructor parameters. In practice, a ViewModel may have 5 dependencies, and each of them may have 3 to 6 dependencies -- some of which repeat. Am I expected to do this whole initialization tree manually? That's the whole point of Dependency Injection, to do that job for me isn't it? Any advice here would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
Added some cool new feature: the ViewModel can implement ICloseable and IActivable with events RequestClose and RequestActiate. Raising those events will automatically close or activate the View! Several of the Avalonia demos are done and it's working beautifully. |
Beta Was this translation helpful? Give feedback.
-
I have just refactored MvvmDialogs to support Avalonia
Code still needs testing and isn't ready to be published, but beta is available from my fork here. (doc isn't updated yet)
Using IDialogService is a whole lot better than the solution written in the Avalonia docs!
Beta Was this translation helpful? Give feedback.
All reactions