From ffa8275fb6e11ac368b06b263f2bf5a548e0b7e2 Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Wed, 22 Oct 2025 15:52:16 +0200 Subject: [PATCH] Upgraded to Avalonia 11.3.7; added dependency injector bindings for the common dialog service --- Properties/AssemblyInfo.cs | 3 +-- Source/MvvmExtensions.cs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 1de311b..4ff8334 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -18,7 +18,6 @@ limitations under the License. #endregion // Apache License 2.0 using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -45,4 +44,4 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.3.3")] +[assembly: AssemblyVersion("1.4.0")] diff --git a/Source/MvvmExtensions.cs b/Source/MvvmExtensions.cs index e586ee9..fa0c78c 100644 --- a/Source/MvvmExtensions.cs +++ b/Source/MvvmExtensions.cs @@ -22,6 +22,7 @@ using System; using Microsoft.Extensions.DependencyInjection; using Nuclex.Avalonia.AutoBinding; +using Nuclex.Avalonia.CommonDialogs; using Nuclex.Avalonia.Messages; namespace Nuclex.Avalonia.DependencyInjection { @@ -60,6 +61,21 @@ namespace Nuclex.Avalonia.DependencyInjection { // with button controls. services.AddSingleton(); + // The file dialogs are Avalonia's variant of the standard file and directory + // picker dialogs, designed to be able to work on classic desktop platforms with + // a user-facing file system as well as on app store and web applications where + // local file storage may need to go through custom platform-specific APIs. + services.AddSingleton(); + + // Provide the file and directory picker services tjhrough our AvaloniaFileDialogs + // service which handles both implementations. + services.AddSingleton( + sp => sp.GetRequiredService() + ); + services.AddSingleton( + sp => sp.GetRequiredService() + ); + return services; }