Hi,
I tried like below adding a Key field (as Id is double but i need as string)
public class WorkoutKanbanModel : KanbanModel
{
public string Key { get; set; }
}
then I created a CardTemplate as below, but I am not able to bind Key property, it doesnt display and also i want to retrieve the same property on ItemTapped event. is it possible?
<kanban:SfKanban AutoGenerateColumns="False" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
ItemTapped="SfKanban_ItemTapped" DragEnd="Kanban_DragEnd" Columns="{Binding KanbanColumns}" ItemsSource="{Binding KanbanModels}">
<kanban:SfKanban.CardTemplate>
<DataTemplate>
<StackLayout>
<Grid ColumnSpacing="0" HorizontalOptions="FillAndExpand" Padding="10" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>
<StackLayout Grid.Column="0" Orientation="Vertical" >
<Label FontSize="Small" Text="{Binding Path=Key}" TextColor="Black" IsVisible="True"/>
<Label Text="{Binding Path=Title}" />
<Label FontSize="Small" Text="{Binding Path=Description}" WidthRequest="150" TextColor="Silver" LineBreakMode="WordWrap" />
</StackLayout>
<StackLayout Grid.Column="1" >
<Image WidthRequest="60" HeightRequest="60" HorizontalOptions="End" VerticalOptions="CenterAndExpand" Source="{Binding Path=ImageURL}"></Image>
</StackLayout>
</Grid>
</StackLayout>
</DataTemplate>
</kanban:SfKanban.CardTemplate>
</kanban:SfKanban>
Last thing, Is it possible that you can share your default CardTemplate for SfKanban, I really like it and I want my custom CardTemplate to be similar to it.
thanks,
Emil