diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
index a0303a4cd3..ba1c77bd69 100644
--- a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
+++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
@@ -1,6 +1,7 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
+using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Avalonia.Markup.Xaml.Data;
@@ -9,6 +10,8 @@ using Avalonia.Markup.Xaml.Templates;
using Avalonia.Media;
using Avalonia.Styling;
using Avalonia.UnitTests;
+using System.Collections;
+using System.ComponentModel;
using System.Linq;
using Xunit;
@@ -680,5 +683,50 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
Assert.Equal((object)NonControl.StringProperty, txt.Tag);
}
+
+ [Fact]
+ public void Binding_To_List_AvaloniaProperty_Is_Operational()
+ {
+ using (UnitTestApplication.Start(TestServices.MockWindowingPlatform))
+ {
+ var xaml = @"
+
+
+";
+
+ var window = AvaloniaXamlLoader.Parse(xaml);
+ var listBox = (ListBox)window.Content;
+
+ var vm = new SelectedItemsViewModel()
+ {
+ Items = new string[] { "foo", "bar", "baz" }
+ };
+
+ window.DataContext = vm;
+
+ Assert.Equal(vm.Items, listBox.Items);
+
+ Assert.Equal(vm.SelectedItems, listBox.SelectedItems);
+ }
+ }
+
+ private class SelectedItemsViewModel : INotifyPropertyChanged
+ {
+ public string[] Items { get; set; }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ private IList _selectedItems = new AvaloniaList();
+
+ public IList SelectedItems
+ {
+ get { return _selectedItems; }
+ set
+ {
+ _selectedItems = value;
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SelectedItems)));
+ }
+ }
+ }
}
}
\ No newline at end of file