From c01c9ae7b662342b653bda4d01a720c57ae886e0 Mon Sep 17 00:00:00 2001 From: Dariusz Komosinski Date: Mon, 19 Jul 2021 12:19:57 +0200 Subject: [PATCH] Disable text search by default. Only ComboBox needs it enabled by default. --- src/Avalonia.Controls/ComboBox.cs | 1 + src/Avalonia.Controls/Primitives/SelectingItemsControl.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/ComboBox.cs b/src/Avalonia.Controls/ComboBox.cs index 89cfb5fa8f..57c07916db 100644 --- a/src/Avalonia.Controls/ComboBox.cs +++ b/src/Avalonia.Controls/ComboBox.cs @@ -91,6 +91,7 @@ namespace Avalonia.Controls FocusableProperty.OverrideDefaultValue(true); SelectedItemProperty.Changed.AddClassHandler((x,e) => x.SelectedItemChanged(e)); KeyDownEvent.AddClassHandler((x, e) => x.OnKeyDown(e), Interactivity.RoutingStrategies.Tunnel); + IsTextSearchEnabledProperty.OverrideDefaultValue(true); } /// diff --git a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs index 2fd08ef77c..336ff711c0 100644 --- a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs +++ b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs @@ -96,7 +96,7 @@ namespace Avalonia.Controls.Primitives /// Defines the property. /// public static readonly StyledProperty IsTextSearchEnabledProperty = - AvaloniaProperty.Register(nameof(IsTextSearchEnabled), true); + AvaloniaProperty.Register(nameof(IsTextSearchEnabled), false); /// /// Event that should be raised by items that implement to