I am attempting to create a Custom Item Template for my carousel that is bound to a datatable. The problem is that when I do the below XAML code, it displays System.DataRow.View or something like that instead of the actual data. I think it has something to do with not defining my data type. What should I put in the DataType property for my DataTemplate in the case that it is bound to a datatable?
<Grid.Resources> |
<DataTemplate DataType=""> |
<Border Background="LightSlateGray" Padding="10"> |
<Grid> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="60" /> |
<ColumnDefinition Width="*" /> |
</Grid.ColumnDefinitions> |
<Grid.RowDefinitions> |
<RowDefinition Height="20" /> |
<RowDefinition Height="*" /> |
</Grid.RowDefinitions> |
<TextBlock Grid.Column="0" Grid.Row="0" Text="DocumentMasterID"> |
<TextBlock.TextDecorations> |
<TextDecoration Location="Underline" /> |
</TextBlock.TextDecorations> |
</TextBlock> |
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding Path=Data[DocumentMasterID]}" /> |
<TextBlock Grid.Column="1" Grid.Row="0" Text="CleanLeadsID"> |
<TextBlock.TextDecorations> |
<TextDecoration Location="Underline" /> |
</TextBlock.TextDecorations> |
</TextBlock> |
<TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding Path=Data[CleanLeadsID]}" /> |
</Grid> |
</Border> |
</DataTemplate> |
</Grid.Resources> |