I have a list page with the following element template as follows:
<ListBox x:Name="test">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MaxHeight="108" Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Height="108" Grid.Column="0" Fill="{Binding Color}"/>
<Image Source="{Binding Image}" Height="108" Width="108" Grid.Column="1" HorizontalAlignment="Left" Stretch="UniformToFill"/>
<StackPanel Grid.Column="2">
<TextBlock Text="{Binding Title}" TextWrapping="NoWrap" />
<TextBlock Text="{Binding SubHeading}" TextWrapping="NoWrap" />
<TextBlock Text="{Binding Body}" TextWrapping="Wrap" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
In the Page's OnNavigatedTo event, I set the source of the list item to an observable collection of about 20 items.
Everything is fine, and the list is filled, however, when scrolling up or down the list, the elements do not look synchronized with the user interface. for example, the text that was shown in the first element of the list appears in the last element in the list, is sometimes duplicated, and each time you scroll up or down, the elements are different.
I have been debugging list items, and I see that the right objects are tied to the right items. So this is just what is displayed in the user interface, which is incorrect.
, , , , .
, - . . , 30 .
longlightselector silverlight . , longlistselector.
, , , ? , longlistselector?
.