Closed prabhav-mehra closed 8 months ago
Setting ItemTemplate with a custom DataTemplate doesn't work unless it is a TextCell.
DataTemplate
TextCell
For example:
<runtimetoolkit:BookmarksView Grid.Row="1" GeoView="{Binding GeoView}"> <runtimetoolkit:BookmarksView.ItemTemplate> <DataTemplate x:DataType="runtime:Bookmark"> <HorizontalStackLayout Padding="4,16" Spacing="16"> <Label Text="{Binding Name}" /> </HorizontalStackLayout> </DataTemplate> </runtimetoolkit:BookmarksView.ItemTemplate> </runtimetoolkit:BookmarksView>
This doesn't work and doesn't show the name.
It works if I set it as TextCell tho.
Main reason why I want this is because I want to add more style like an image or something and then the name
I got it working. Was missing a "ViewCell" with the template
Weird that the TextCell still worked without it
Setting ItemTemplate with a custom
DataTemplate
doesn't work unless it is aTextCell
.For example:
This doesn't work and doesn't show the name.
It works if I set it as TextCell tho.
Main reason why I want this is because I want to add more style like an image or something and then the name