-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTemplateSelector on CollectionView is completely broken - templates don't match BindingContext #12988
Comments
Related or the same as #11272 |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Hi @Vroomer. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Not repro on Windows platform with sample project. |
|
I also have found this an issue (8.2.1) - I have ~130 entries to enumerate, though the |
I am also facing this issue. Collectionview control is not usable with this bug if we have to vertically scroll. I am trying to convert the existing xamaring app to maui and stuck with this. cant migrate it without this bug is fixed. Update: |
Description
Items in CollectionView utilizing DataTemplateSelector get often assigned to wrong DataTemplate. It appears to be a problem related to recycling views. While first items are usually displayed with correct DataTemplate, once the recycling kicks in the DataTemplates are mismatched. It's a serious issue as it makes the DataTemplateSelector unusable without any workaround. The problem was observed on Windows. Other platforms were not tested.
It might be the same problem as #11272. There is also a related PR to this issue right now #12011, but both the issue and PR mention only Android and iOS and the description of the problem is different. In my case the views get recycled, but incorrectly.
I made a sample showing list of colors to visualize the problem. Each row consists of two colors - one color assigned by DataTemplate and the other assigned by BindingContext.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Vroomer/MAUI-CollectionView-DataTemplateSelector-Bug.git
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
Windows SDK 10.0.22621
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: