[Core] Isn't DataTemplateSelector the wrong name? #3749
Comments
I can't understand why |
This happens: #3544 |
@GalaxiaGuy So much confusion in that thread, and it shows that having DataTemplateSelector derived from DataTemplate creates a lot of confusion. I am not sure why the issue is marked with "needs-repro" and "needs-info". The method I think what happened is, in Xamarin Forms someone decided to fuse the roles of DataTemplate and DataTemplateSelector, in order to make it easier™ to work with |
I assume the tags are left there from the initial post which didn't have a concrete example of the problem. One thing to note is it not just I faced the issue of just calling There is also the limitation that Of course there is the issue that changing any code that interacts with |
I think you're missing the point, there's no problem with using In XAML frameworks (WPF\UWP) |
I was trying to point that even though having Other than the idea that changing it now might cause more problems, I agree with what you said. |
Adding the new property would not break existing code, it would just give the right way which should have existed from the beginning. |
@xamarin Your feedback is needed, how do you want to handle this? Unfortunately changing In order to make it a bit better for existing ListView, my suggestion would be to:
I hope at least the new CollectionView will have a dedicated |
maybe the name is wrong, maybe the inheritance tree is wrong... but this ship has sailed, and we can't change that anymore :/ let's follow the discussion on how to open it in #3544 |
This class is inheriting from
DataTemplate
which technically makes it another data template. A selector seems to imply a different kind of class that provides functionality around the object it works with. Shouldn't it be actually called something likeMultiDataTemplate
? I'm wondering if this class can be marked obsolete in favor of something that serves its purpose. Maybe the name is fine, but it shouldn't inherit from that base class.The text was updated successfully, but these errors were encountered: