From c677fb4b4da5d616c6d2e8cb713a0284840e0604 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 25 Aug 2020 14:27:01 +0200 Subject: [PATCH] Don't autoselect with no items. --- src/Avalonia.Controls/Primitives/SelectingItemsControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs index 6a17fefc2c..11f668313d 100644 --- a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs +++ b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs @@ -631,7 +631,7 @@ namespace Avalonia.Controls.Primitives /// The event args. private void OnSelectionModelLostSelection(object sender, EventArgs e) { - if (AlwaysSelected) + if (AlwaysSelected && Items is object) { SelectedIndex = 0; }