From 5d7e417029d6e7512c34c03414fb013c81a584c8 Mon Sep 17 00:00:00 2001 From: Dominik Titl <78549750+morning4coffe-dev@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:29:15 +0200 Subject: [PATCH] chore: Remove Android and iOS `AutoSuggestBox` checks --- .../Views/SamplePages/AutoSuggestBoxSamplePage.xaml.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Uno.Gallery/Views/SamplePages/AutoSuggestBoxSamplePage.xaml.cs b/Uno.Gallery/Views/SamplePages/AutoSuggestBoxSamplePage.xaml.cs index c4ff59672..7ce439c50 100644 --- a/Uno.Gallery/Views/SamplePages/AutoSuggestBoxSamplePage.xaml.cs +++ b/Uno.Gallery/Views/SamplePages/AutoSuggestBoxSamplePage.xaml.cs @@ -3,6 +3,8 @@ using System.Linq; using Uno.Gallery.ViewModels; using Microsoft.UI.Xaml.Controls; +using Uno.Gallery.Helpers; +using Microsoft.UI.Xaml.Media; namespace Uno.Gallery.Views.Samples { @@ -16,13 +18,10 @@ public AutoSuggestBoxSamplePage() private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) { - //This check can be removed when https://github.com/unoplatform/uno/issues/11635 is fixed -#if !__ANDROID__ && !__IOS__ if (args.Reason != AutoSuggestionBoxTextChangeReason.UserInput) { return; } -#endif if (string.IsNullOrEmpty(sender.Text)) { @@ -31,6 +30,7 @@ private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTex if (((Sample)DataContext).Data is AutoSuggestBoxSamplePageViewModel viewModel) { + EnsureFluentResourcesForPopups(sender); sender.ItemsSource = viewModel.GetSuggestedItems(sender.Text).Select(sample => sample.Title).ToList(); } } @@ -46,16 +46,14 @@ private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestB private void SearchBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) { - //This check can be removed when https://github.com/unoplatform/uno/issues/11635 is fixed -#if !__ANDROID__ && !__IOS__ if (args.Reason != AutoSuggestionBoxTextChangeReason.UserInput) { return; } -#endif if (((Sample)DataContext).Data is AutoSuggestBoxSamplePageViewModel viewModel) { + EnsureFluentResourcesForPopups(sender); sender.ItemsSource = viewModel.GetSuggestedItems(sender.Text); } }