ListBox crashes the built app when a PaintCellBackground handler exists
In the built app (not in debug mode), refilling a ListBox (RemoveAllRows, changing ColumnCount, AddRow) crashes the process when the window has a ListBox1_PaintCellBackground handler, even if the handler only returns False. Removing the handler avoids it.
Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Objo.StdLib.Desktop.ListBoxMethods.ListBoxPhantomBackground.UpdateCells()
at Objo.StdLib.Desktop.ListBoxMethods.ListBoxPhantomBackground.OnLayoutUpdated(Object sender, EventArgs e)
at Avalonia.Layout.Layoutable.LayoutManagedLayoutUpdated(Object sender, EventArgs e)
at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
...