/// <summary> /// 加载记录命令内容 /// </summary> async Task ExecuteLoadItemsCommand() { IsBusy = true; try { RecordCollection.Clear(); var records = await DataStore.GetItemsAsync(true); records = records.OrderByDescending(p => p.Year).ThenByDescending(p => p.Month) .ThenByDescending(p => p.Day).ThenByDescending(p => p.Id); foreach (var record in records) { RecordCollection.Add(record); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }