f2
This commit is contained in:
parent
17ae2c400a
commit
f8379ac6d9
@ -18,8 +18,6 @@ list.Add(20);
|
||||
list.AddRange(new[] { 10, 20, 30 });
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace WpfApp
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
ObservableList<int> list;
|
||||
public ISynchronizedView<int, int> ItemsView { get; set; }
|
||||
public INotifyCollectionChangedSynchronizedView<int> ItemsView { get; set; }
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
@ -35,7 +35,7 @@ namespace WpfApp
|
||||
|
||||
list = new ObservableList<int>();
|
||||
list.AddRange(new[] { 1, 10, 188 });
|
||||
ItemsView = list.CreateSortedView(x => x, x => x, comparer: Comparer<int>.Default).WithINotifyCollectionChanged();
|
||||
ItemsView = list.CreateSortedView(x => x, x => x, comparer: Comparer<int>.Default).ToNotifyCollectionChanged();
|
||||
|
||||
|
||||
BindingOperations.EnableCollectionSynchronization(ItemsView, new object());
|
||||
|
@ -45,7 +45,7 @@ namespace ObservableCollections
|
||||
//{
|
||||
//}
|
||||
|
||||
public interface INotifyCollectionChangedSynchronizedView<out TView> : IReadOnlyCollection<TView>, INotifyCollectionChanged, INotifyPropertyChanged
|
||||
public interface INotifyCollectionChangedSynchronizedView<out TView> : IReadOnlyCollection<TView>, INotifyCollectionChanged, INotifyPropertyChanged, IDisposable
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user