I am attempting to create a custom Kanban card view to use inside of the SfKanban control. I have it mostly working, except that the binding values do not show correctly. My SfKanban control is set up as follows:
<kanban:SfKanban Grid.Row="1"
ItemsSource="{Binding CurrentResources}"
MaxColumnWidth="200"
CardDragEnd="SfKanban_CardDragEnd"
CardDragStart="SfKanban_CardDragStart"
Columns="{Binding TacPlanColumns}"
ColumnMappingPath="TacPlanName"
ColumnsGenerated="SfKanban_ColumnsGenerated"
AutoGenerateColumns="True"
x:Name="kanban">
<!--CardTemplate="{StaticResource ResourceCard}">-->
<kanban:SfKanban.CardTemplate>
<DataTemplate>
<controls:ResourceCard Value="{Binding}"/>
</DataTemplate>
</kanban:SfKanban.CardTemplate>
</kanban:SfKanban>
The columns are created successfully, and the correct number of cards show up, but Value is not bound in the ResourceCard control.
The ResourceCard.xaml uses the following:
<Border Background="White" BorderBrush="Black" BorderThickness="2" CornerRadius="4" Margin="2">
<Grid Background="White" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/> <!-- par timer -->
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Margin="1" Text="{Binding ResourceId}" FontWeight="Bold" Style="{DynamicResource TextBlockStyle}"/>
<TextBlock Grid.Column="0" Grid.Row="1" Margin="1" Text="{Binding AssignedPersons}" FontStyle="Italic" Style="{DynamicResource TextBlockStyle}"/>
<skia:SKElement x:Name="canvasView" PaintSurface="CanvasView_PaintSurface" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Margin="0"/>
<Image Grid.Column="1" Grid.Row="0" Source="{Binding StatusImagePath}" Height="30" Width="30"/>
<Image Grid.Column="1" Grid.Row="1" Source="{Binding InChargeImagePath}" Height="30" Width="30"/>
</Grid>
</Border>
In the code behind, I have added a DependencyProperty for Value, but it is never set.
I have looked at previous questions about this on this forum, and they have been provided links to the Getting Started project, which does not do what I need it to do. Is this even possible?