MPowerKit / VirtualizeListView

.NET MAUI ListView renderers. Improves performance for MAUI ListView, adds additional behaviors
MIT License
69 stars 10 forks source link

Usage with `DataTemplateSelector` results in `LayoutCycleException` #11

Closed daltzctr closed 1 month ago

daltzctr commented 1 month ago

Reproduced on Windows

Reproduction:

  1. Create a VirtualizeListView with an ItemsSource binded to a List<object>
  2. Create a DataTemplateSelector that selects views based on object type (or you could have fixed objects, this is just what I have in production)
  3. Set ItemTemplate of VirtualizeListView to the DataTemplateSelector you created.
  4. Run, observe crash. If you break point in OnSelectTemplate, you can observe that duplicate DataTemplates are being created for some reason. Substituting the VirtualizeListView for a CollectionView results in no crash.
Alex-Dobrynin commented 1 month ago

@daltzctr I have a very busy schedule. so please, when you creating an issue, provide a repro project as zip file

Alex-Dobrynin commented 1 month ago

Also, I'm using this listview in my production projects with TemplateSelectors almost everywhere in the apps, no crashes. I suppose you missing smth

Alex-Dobrynin commented 1 month ago

Closing this issue for now, until you provide repro, then will reopen