I have a custom control that has a CollectionView with some builtin features like, multiselection with animations, drag & drop and SwipeItems so I created a contentView with a collectionview that has a
<CollectionView.ItemTemplate>
<DataTemplate>
with inside a
<TemplatedView HorizontalOptions="FillAndExpand"
ControlTemplate="{Binding Source={x:Reference this}, Path=CustomDataTemplate}"
x:Name="TemplateView"></TemplatedView>
When I call my custom list I use
<ControlTemplate x:Key="ctrlRoot">
<StackLayout Orientation="Vertical">
<Label Grid.Column="0" Text="{TemplateBinding Parent.BindingContext.UniqueId}"></Label>
<Label Grid.Column="0" Text="{TemplateBinding Parent.BindingContext.Text}"></Label>
</StackLayout>
</ControlTemplate>
It works but as you can see I must bind data with TemplateBinding and I want to use the {Binding command... it is possible to achieve this somehow ?
I neet to pass a DataTemplate not a ControlTemplate but I don't know how to refactor this...
Thanks