Upgraded to Avalonia 11.3.7; added dependency injector bindings for the common dialog service
This commit is contained in:
		
							parent
							
								
									74b4625e55
								
							
						
					
					
						commit
						ffa8275fb6
					
				
					 2 changed files with 17 additions and 2 deletions
				
			
		| 
						 | 
					@ -18,7 +18,6 @@ limitations under the License.
 | 
				
			||||||
#endregion // Apache License 2.0
 | 
					#endregion // Apache License 2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using System.Reflection;
 | 
					using System.Reflection;
 | 
				
			||||||
using System.Runtime.CompilerServices;
 | 
					 | 
				
			||||||
using System.Runtime.InteropServices;
 | 
					using System.Runtime.InteropServices;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// General Information about an assembly is controlled through the following 
 | 
					// General Information about an assembly is controlled through the following 
 | 
				
			||||||
| 
						 | 
					@ -45,4 +44,4 @@ using System.Runtime.InteropServices;
 | 
				
			||||||
//      Build Number
 | 
					//      Build Number
 | 
				
			||||||
//      Revision
 | 
					//      Revision
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
[assembly: AssemblyVersion("1.3.3")]
 | 
					[assembly: AssemblyVersion("1.4.0")]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@ using System;
 | 
				
			||||||
using Microsoft.Extensions.DependencyInjection;
 | 
					using Microsoft.Extensions.DependencyInjection;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Nuclex.Avalonia.AutoBinding;
 | 
					using Nuclex.Avalonia.AutoBinding;
 | 
				
			||||||
 | 
					using Nuclex.Avalonia.CommonDialogs;
 | 
				
			||||||
using Nuclex.Avalonia.Messages;
 | 
					using Nuclex.Avalonia.Messages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Nuclex.Avalonia.DependencyInjection {
 | 
					namespace Nuclex.Avalonia.DependencyInjection {
 | 
				
			||||||
| 
						 | 
					@ -60,6 +61,21 @@ namespace Nuclex.Avalonia.DependencyInjection {
 | 
				
			||||||
      // with button controls.
 | 
					      // with button controls.
 | 
				
			||||||
      services.AddSingleton<IAutoBinder, ConventionBinder>();
 | 
					      services.AddSingleton<IAutoBinder, ConventionBinder>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // 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<AvaloniaFileDialogs>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // Provide the file and directory picker services tjhrough our AvaloniaFileDialogs
 | 
				
			||||||
 | 
					      // service which handles both implementations.
 | 
				
			||||||
 | 
					      services.AddSingleton<IFilePickerService>(
 | 
				
			||||||
 | 
					        sp => sp.GetRequiredService<AvaloniaFileDialogs>()
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					      services.AddSingleton<IDirectoryPickerService>(
 | 
				
			||||||
 | 
					        sp => sp.GetRequiredService<AvaloniaFileDialogs>()
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return services;
 | 
					      return services;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue