I have a WP8 LongListSelector with the following template:
<DataTemplate x:Key="ItemTemplate">
<Grid Margin="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="110"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<controls:BlockImageControl
Grid.Column="0"
Width="110"
Height="110"
Background="Transparent" />
<TextBlock x:Name="Name"
Grid.Column="1"
Text="{Binding ScreenName}"
FontSize="{StaticResource PhoneFontSizeLarge}"
FontWeight="Bold"
VerticalAlignment="Center"/>
<CheckBox x:Name="Unblock" Grid.Column="2" VerticalAlignment="Center"
Tap="BlocksList_Tap"
IsChecked="false"
/>
</Grid>
</DataTemplate>
As you can see there is a checkbox at the end of each cell item, which enables the user to select multiple items. IsChecked is false by default.
The problem is that the LongListSelector seems to be caching the Checked state of my checkbox. If I check the very first, item, then scroll down partway, after about 30 or so items, I see another item checked which I did not select. The rest of the bindings work. It is as if it is ignoring the "IsChecked" property in the template. I tried binding the IsChecked attribute to a property, no luck.
Does anyone know if this is a bug, and if not, how I can correct this behavior?
Thanks!