Closed sn4k3 closed 4 years ago
Your ListBox.Items is bind to a list of ComboBox controls. I think this exception occurs when Avalonia tries to change ComboBox parent for virtualization. Try to set <ListBox VirtualizationMode="None" ... > as a workaround.
It seems to be a bug in ListBox VirtualizationMode=Simple, that is enabled by default. I believe, migration to ItemsRepeater in the ListBox internals should fix this problem. https://github.com/AvaloniaUI/Avalonia/pull/4779
By the way, it's more common way to use ItemTemplate with the ListBox - https://avaloniaui.net/docs/controls/listbox. You can define ComboBox in that template, and configure TwoWay binding to your model.
VirtualizationMode="None"
worked.
By the way, it's more common way to use ItemTemplate with the ListBox - https://avaloniaui.net/docs/controls/listbox. You can define ComboBox in that template, and configure TwoWay binding to your model.
Thank you for the tip, i will take a look
I will keep the issue open as it seens a real issue, fell free to close it if not
It is a real issue, but there is another one with same bug - https://github.com/AvaloniaUI/Avalonia/issues/4265 Closing this one.
I'm getting this error when scroll a ListBox or resize the window containing the listbox on neasted grids:
AXAML: https://github.com/sn4k3/UVtools/blob/master/UVtools.WPF/Windows/PrusaSlicerManager.axaml