如果我想在列表中显示数据怎么办。它会覆盖我的列表。我想拥有列表格式的所有数据。请帮我解决这个问题。我正在使用代码:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (pg_addPet.settings.Contains("iso_mypet_list"))
{
System.Diagnostics.Debug.WriteLine("contains settings data already ...");
pg_addPet.list_listMyPet = (List<SaveMypet>)pg_addPet.settings["iso_mypet_list"];
if (pg_addPet.list_listMyPet != null)
{
listbox_mypet.Dispatcher.BeginInvoke(() =>
{
listbox_mypet.ItemsSource = pg_addPet.list_listMyPet;
});
//listbox_mypet.ItemsSource = pg_addPet.list_listMyPet;
}
}