1

这是我的代码

<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>

在每个 LLS 项目中都包含一个 Listbox,其中显示时间列表。我的问题是......我可以在没有 Listbox 的情况下显示时间列表吗?似乎 Listbox 导致性能低下。

4

0 回答 0