ObservableSortedList
A list that can be observed for blend and other components and maintains sorting order.
This allows you to observe both an index, observe a value at an index, and more.
This class is a red-black binary sorted tree. Unlike previous iterations of this class, we can add values in log(n) time, and remove in log(n) time, and it uses less memory.
Previously we'd use O(n^2) processing time when constructing this class.
We reuse the node itself as the indexing key.
This class always prefers to add equivalent elements to the end of the list if they're not in the list. Otherwise it prefers minimal movement.
Properties
ItemAdded
This item is read only and cannot be modified. Read OnlyFires when an item is added
ItemRemoved
This item is read only and cannot be modified. Read OnlyFires when an item is removed.