Saturday, 31 August 2013

LongListSelector's performance is very bad. How to improve?

LongListSelector's performance is very bad. How to improve?

here is my code
<phone:LongListSelector ItemsSource="{Binding
MovieTimeInDetailItems}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel Margin="24,0,0,12">
<TextBlock Text="{Binding Theater}"
FontSize="34"/>
<ListBox ItemsSource="{Binding TimeItems}"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="115"
Margin="0,0,0,0">
<TextBlock Text="{Binding
Time}"
TextWrapping="Wrap"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="26"
Foreground="{StaticResource
PhoneSubtleBrush}"/>
<Border Margin="92,0,0,0"
HorizontalAlignment="Left"
Width="{Binding Width}"
Height="25"
BorderThickness="1.5,0,0,0"
BorderBrush="{StaticResource
PhoneSubtleBrush}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
In each LLS item contains a Listbox which display time list. my question
is ... Can I display a time list without Listbox ? It seems Listbox cause
the low performance.

No comments:

Post a Comment