Is there a way to limit the size of the total collection?
I have a Stack of WriteableBitmap that I use to store a clone of writeableBitmap every time I change, which means that I can easily undo by simply popping the latest WriteableBitmap from the stack.
The problem is memory usage, I want to limit this stack to 10 objects, but I donβt see a property that allows me to easily do this. Is there a way, or will I have to check the size of the stack every time I change and copy the last 10 objects to a new stack whenever I press 10, and every subsequent change? I know how to do this, but was hoping there was an easier way, is there?
source share