You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write some observable data classes which use mutable array of a fixed size.
I need something like ObservableCollection but without the ability to add and remove items.
I also noticed that there are no equivalents of Dictionary, Stack, Queue, and HashSet which would be nice.
API breakdown
Observable Arrays would be ObservableCollection without any methods that add or remove items.
Items could still be mutated and they would trigger collection.property changes
I don't know about the other collections, I'm sure they would just use the same api as the normal system.collections do they would just support notification.
Usage example
public sealed class ColorMap : ObservableArray<ObservableColor>
{
public ColorMap(uint colorCount, uint shadeCount=1) : base(colorCount * shadeCount)
{
}
}
Breaking change?
I'm not sure
Alternatives
For array exposing the ability to add and remove items, for things like dictionary probably nothing.
Additional context
Right now I am trying to make a indexed image system using notifications.
When the color in the palette or image changes I reflect that on the actual bitmap.
Help us help you
No, just wanted to propose this
The text was updated successfully, but these errors were encountered:
Overview
I am trying to write some observable data classes which use mutable array of a fixed size.
I need something like ObservableCollection but without the ability to add and remove items.
I also noticed that there are no equivalents of Dictionary, Stack, Queue, and HashSet which would be nice.
API breakdown
Observable Arrays would be ObservableCollection without any methods that add or remove items.
Items could still be mutated and they would trigger collection.property changes
I don't know about the other collections, I'm sure they would just use the same api as the normal system.collections do they would just support notification.
Usage example
Breaking change?
I'm not sure
Alternatives
For array exposing the ability to add and remove items, for things like dictionary probably nothing.
Additional context
Right now I am trying to make a indexed image system using notifications.
When the color in the palette or image changes I reflect that on the actual bitmap.
Help us help you
No, just wanted to propose this
The text was updated successfully, but these errors were encountered: