From d23aa6b1f1b45039a0a408ea06830604405b60d5 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Tue, 5 May 2020 15:08:34 +0300 Subject: [PATCH 1/5] Allow extra options for managed file dialogs --- samples/ControlCatalog/Pages/DialogsPage.xaml | 1 + .../ControlCatalog/Pages/DialogsPage.xaml.cs | 14 ++++++++++++++ .../ManagedFileChooserViewModel.cs | 12 ++++++++---- .../ManagedFileDialogExtensions.cs | 19 +++++++++++++++++-- .../ManagedFileDialogOptions.cs | 7 +++++++ 5 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 src/Avalonia.Dialogs/ManagedFileDialogOptions.cs diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml b/samples/ControlCatalog/Pages/DialogsPage.xaml index 60f8e3656ea..98ca2887d86 100644 --- a/samples/ControlCatalog/Pages/DialogsPage.xaml +++ b/samples/ControlCatalog/Pages/DialogsPage.xaml @@ -6,6 +6,7 @@ + diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs index 81af19f31be..127fa4d1df5 100644 --- a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs +++ b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Reflection; using Avalonia.Controls; +using Avalonia.Dialogs; using Avalonia.Markup.Xaml; #pragma warning disable 4014 @@ -58,6 +59,19 @@ List GetFilters() Title = "Select folder", }.ShowAsync(GetWindow()); }; + this.FindControl + diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs index 81af19f31be..127fa4d1df5 100644 --- a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs +++ b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Reflection; using Avalonia.Controls; +using Avalonia.Dialogs; using Avalonia.Markup.Xaml; #pragma warning disable 4014 @@ -58,6 +59,19 @@ List GetFilters() Title = "Select folder", }.ShowAsync(GetWindow()); }; + this.FindControl