Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Created Issue: CheckListBox.ItemTemplate not working in version 1.9 [19421]

$
0
0
I hit what seems to be a problem with v.1.9 of the toolkit. Setting the CheckListBox.ItemTemplate property does not work and the DataTemplate which is set as a value of the property is completely ignored. Version 1.8 of the toolkit does not have this same problem. I had to downgrade to version 1.8 to avoid the issue.

This is a sample of the code which works fine in version 1.8 but not in 1.9:

<xtlk:CheckListBox x:Name="lstTasks" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="5" Background="White"
ItemSelectionChanged="lstTasks_ItemSelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<xtlk:CheckListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.Style>
<Style TargetType="Grid">
<Style.Setters>
<Setter Property="TextElement.Foreground" Value="Red"/>
</Style.Setters>
<Style.Triggers>
<DataTrigger Binding="{Binding Path=TaskInvoiceCount}" Value="0">
<Setter Property="TextElement.Foreground" Value="Black"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Ready}" Value="False">
<Setter Property="TextElement.Foreground" Value="Green"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="85"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=Category.CategoryName}" Margin="0,0,10,0" TextWrapping="WrapWithOverflow"/>
<TextBlock Grid.Column="1" Text="{Binding Path=TaskDate, StringFormat={}{0:dd-MMM-yyyy}, Mode=OneWay}" Margin="0,0,10,0" TextAlignment="Right"/>
<TextBlock Grid.Column="2" Style="{StaticResource currencyStyle}" Text="{Binding Path=Fees, StringFormat=C, Mode=OneWay}" Margin="0,0,10,0"/>
<TextBlock Grid.Column="3" Style="{StaticResource currencyStyle}" Text="{Binding Path=Vat, StringFormat=C, Mode=OneWay}" Margin="0,0,10,0"/>
<TextBlock Grid.Column="4" Style="{StaticResource currencyStyle}" Text="{Binding Path=Disbursements, StringFormat=C, Mode=OneWay}" Margin="0,0,5,0"/>
<TextBlock Grid.Column="5" Style="{StaticResource currencyStyle}" Text="{Binding Path=Total, StringFormat=C, Mode=OneWay}"/>
</Grid>
</DataTemplate>
</xtlk:CheckListBox.ItemTemplate>
</xtlk:CheckListBox>

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>