[英]unable to display data from list
由於某種原因,它不顯示日期有什么問題嗎?
IsolatedStorageSettings uc = IsolatedStorageSettings.ApplicationSettings;
public void load()
{
List<DateTime> List = new List<DateTime>();
Schedule.ItemsSource = null;
List<s> medicationList = (List<s>)uc["nList"];
foreach(sn temp in List)
{
if (dateList.Contains(t.Date))
{
}
else
{
date.Add(t.Date);
Schedule.ItemsSource = List;
}
}
}
愚蠢的錯誤(解決方案)
<ListBox x:Name="Schedule" >
</ListBox>
那些並刪除不必要的代碼
首先,移動lstboxSchedule.ItemsSource = dateList;
在foreach之外。
設置斷點以查看是否/為什么生成的列表為空。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.