Skip to content

Releases: mysteryx93/HanumanInstitute.MvvmDialogs

v2.1

30 Dec 23:31
Compare
Choose a tag to compare

This version introduces some breaking changes.

  • StrongViewLocator must now have its registrations in its constructor. See updated documentation.. This change was required because 2 separate instances are created: one for MvvmDialogs and one for Avalonia defined in App.axaml.
  • Now apply picker SuggestedStartLocation and SuggestedFileName. The property names and types have been modified.
  • Complete overhaul and simplification of FileSystem classes. IPathInfoFactory and IBookmarkFileSystem have been removed. See new documentation here. DialogStorageFile got renamed to DesktopDialogStorageFile and DesktopDialogStorageFactory is available.

Other changes:

  • Dialog show calls will now be ignored in design mode to avoid errors
  • Updated CrossPlatform.Browser to run
  • ViewLocatorBase now calls CreateViewInstance virtual method instead of Activator.CreateInstance for easier customization.

Happy New Year!! May 2024 be the best year in a while

v2.0

15 Jul 00:03
Compare
Choose a tag to compare

Version 2.0 is ready!

What's new:

  • Updated for Avalonia v11.0.0
  • Changed license to MIT
  • Removed AppSettings. Design was clumsy, and when it's actually needed, it doesn't work well with the modular design.
  • AllowConcurrentDialogs option has been moved to the DialogManager
  • Other options (in WPF) have been moved to the DialogFactory
  • Avalonia.MessageBox: added an option to display message boxes as windows or popups. Option is available when configuring the DialogFactory: new DialogFactory().AddMessageBox(MessageBoxMode.Popup)

v2.0-rc1

11 Jun 00:49
Compare
Choose a tag to compare

v2.0-rc1 is ready!

What's new:

  • ViewModel event handling is now supported for ViewModels shown in DialogHost, FluentContentDialog and FluentTaskDialog
  • DialogHost now supports mobile back button
  • DialogHost can now display any type of content: ViewModel, Control, or direct content. Renamed ContentViewModel property to Content.
  • Avalonia now targets .Net Standard 2.0
  • Target Avalonia UI v2.0-rc1.1

v2.0-preview7

18 Mar 23:49
Compare
Choose a tag to compare

Version 2.0-preview7 is ready!

What's new:

  • Automatically set MainWindow in Avalonia when showing the first window

DialogHost and Aura.UI Support

07 Mar 22:55
Compare
Choose a tag to compare

Added support for DialogHost.Avalonia popup views.

Added support for  Aura.UI message boxes for MvvmDialogs v1.4.1 as Aura.UI does not yet support Avalonia11.

See updated documentation.

v2.0-preview6

06 Mar 08:00
Compare
Choose a tag to compare

v2.0-preview6 is ready!

What's new:

  • Async close confirmation now works properly with mobile navigation
  • Added an application setting: AllowConcurrentDialogs. When False (default), it will wait for the previous dialog to close before showing the next one. If you call 3 message boxes at the same time, it will show the message boxes one after the other instead of 3 on top of each other.

v2.0-preview5

02 Mar 19:37
Compare
Choose a tag to compare

V2.0-preview5 is ready!

What's new: StrongViewLocator to register ViewModel-View combinations in a strongly-typed way to avoid the use of reflection. Useful if you want to use Assembly Trimming! Works for both desktop and mobile and selects the View accordingly.

Sample ViewLocator registration:

locator = new StrongViewLocator() { ForceSinglePageNavigation = false }
    .Register<MainViewModel, MainView, MainWindow>()
    .Register<CurrentTimeViewModel, CurrentTimeView, CurrentTimeWindow>()
    .Register<ConfirmCloseViewModel, ConfirmCloseView, ConfirmCloseWindow>();

build.RegisterLazySingleton(() => (IDialogService)new DialogService(
    new DialogManager(viewLocator: locator),
    viewModelFactory: x => Locator.Current.GetService(x)));

It could be done even better. This StaticViewLocatorGenerator (usage here) could be adapted to be more generic and serve for our needs. It would use a Source Generator to generate ViewModel-View mapping at compile-time using naming standards and removing the need for reflection. If someone has experience with Source Generators, contribution is welcomed!

v2.0-preview4

22 Feb 20:24
Compare
Choose a tag to compare

Preview 4 is ready with minor changes for Avalonia. What's new:

  • Fixed file dialogs filters that were broken
  • Removed dependency on Reactive

v2.0-preview3

16 Feb 23:28
Compare
Choose a tag to compare

v2.0-preview3 is released for Avalonia11!

It now supports 'magic' mobile navigation on Android and iOS using the exact same API, allowing to convert MVVM desktop apps into mobile with very little efforts. Mobile back navigation is also automatically supported.

Documentation has been updated.

Supporting mobile navigation required extensive internal structural changes which resulted in very little changes to the API.

I believe that these are the only minor breaking changes

  • The default ViewLocator now replaces ViewModel with Window on desktop and View on mobile. If you want the old standard of only replacing with View, you can easily create your ViewLocator with a single line to replace ViewModel with View.
  • File/folder dialogs now return IDialogStorageFile and IDialogStorageFolder instead of string. To get the same path string you had before (on desktop), simply add .LocalPath.

Known limitations:

  • Mobile views are held in a weak cache, and non-visible views should be released from memory when memory is needed. The unit test to ensure this happens does not currently pass. Contribution is welcomed to find the problem.
  • Closing async cancellation does not yet work with mobile navigation

v1.4.1 Bug fixes

03 Sep 16:47
Compare
Choose a tag to compare

Version 1.4.1 is ready!

What's new:

  • Renamed the new ViewLoaded/ViewClosing/ViewClosed methods to OnLoaded/OnClosing/OnClosed. Interface names remain the same.
  • Fixed a crash with FluentAvalonia TaskDialog when pressing escape.
  • When owner is null, it will now use the main window, or create a dummy window.