diff --git a/sandbox/WpfApp/MainWindow.xaml b/sandbox/WpfApp/MainWindow.xaml
index 4b92710..a9a07e9 100644
--- a/sandbox/WpfApp/MainWindow.xaml
+++ b/sandbox/WpfApp/MainWindow.xaml
@@ -7,6 +7,14 @@
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
+
+
+
+
+
+
+
+
diff --git a/sandbox/WpfApp/MainWindow.xaml.cs b/sandbox/WpfApp/MainWindow.xaml.cs
index 3befea9..38ab9bf 100644
--- a/sandbox/WpfApp/MainWindow.xaml.cs
+++ b/sandbox/WpfApp/MainWindow.xaml.cs
@@ -1,7 +1,9 @@
-using System;
+using ObservableCollections;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -20,9 +22,33 @@ namespace WpfApp
///
public partial class MainWindow : Window
{
+ ObservableList list;
+ public ISynchronizedView ItemsView { get; set; }
+
public MainWindow()
{
InitializeComponent();
+ this.DataContext = this;
+
+
+
+
+ list = new ObservableList();
+ list.AddRange(new[] { 1, 10, 188 });
+ ItemsView = list.CreateSortedView(x => x, x => x, comparer: Comparer.Default).WithINotifyCollectionChanged();
+
+
+ BindingOperations.EnableCollectionSynchronization(ItemsView, new object());
+ }
+
+ int adder = 99;
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ ThreadPool.QueueUserWorkItem(_ =>
+ {
+ list.Add(adder++);
+ });
}
}
}
diff --git a/sandbox/WpfApp/WpfApp.csproj b/sandbox/WpfApp/WpfApp.csproj
index 4106cb0..d394da3 100644
--- a/sandbox/WpfApp/WpfApp.csproj
+++ b/sandbox/WpfApp/WpfApp.csproj
@@ -7,4 +7,8 @@
true
+
+
+
+