0

ListBoxWP 8.1 Silverlight アプリには次のようなものがあります。

<StackPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">                
    <ListBox x:Name="FavoriteListBox" Visibility="Collapsed" 
             SelectionChanged="FavoriteListBox_SelectionChanged"
             HorizontalAlignment="Stretch"
             VerticalAlignment="Top" Opacity="1"
             Background="{StaticResource PhoneBackgroundBrush}" Foreground="{StaticResource PhoneForegroundBrush}"
             Height="300" Width="250">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <TextBlock Visibility="Visible" x:Name="FavoriteListBoxTextBlock"  
                       FontSize="35" Foreground="Black" Text="{Binding AnswerName}"/>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</StackPanel>

ListBoxのアイテムは次のようになります。

  1. アイテム1
  2. アイテム2
  3. 15まで.....

ただし、現在は1,2,3,4の順ではなく、アイテムが追加されたときの順になっています。

ListBoxアイテムを自動的にシリアル化したい。これはどのように達成できますか?

4

1 に答える 1