-
Looking at the hacker news sample and was looking how to implement a DataTemplateSelector and could not see any obvious ways do it. Normal XAML you would have the template selector as a Resource in the page then use {StaticResource x:Key} to bind it. I could be missing something very obvious. Any pointers would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @roughiain! Are you looking for help creating a Or are you asking how to add a new CollectionView()
.ItemTemplate(new MyDataTemplateSelector()); |
Beta Was this translation helpful? Give feedback.
-
Closed and answered |
Beta Was this translation helpful? Give feedback.
Hi @roughiain!
Are you looking for help creating a
DataTemplateSelector
using C# Markup? Here's an example of how to do it from my app, GitTrends: https://github.com/brminnick/GitTrends/blob/main/GitTrends/Views/Repository/RepositoryDataTemplateSelector.csOr are you asking how to add a
DataTemplateSelector
to aCollectionView
using the C# Markup Extensions? You do it the same way you would do it for aDataTemplate
: