Hi @杨岑 ,
Welcome to Microsoft Q&A!
It is recomended to use ObservableCollection, it provides notifications when items get added or removed, or when the whole list is refreshed.
ObservableCollection<FileCategory> Categories = new ObservableCollection<FileCategory>
{
new FileCategory { Name = "aaa", Description = "aaa item" },
new FileCategory { Name = "bbb", Description = "bbb item" },
new FileCategory { Name = "ccc", Description = "ccc item" },
};
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.