示例#1
0
        private async Task FetchItems()
        {
            IsBusy = true;
            Items.Clear();
            var items = await _postApi.GetPostsAsync();

            foreach (Post post in items)
            {
                Items.Add(post);
            }
            Console.WriteLine("number of items: " + Items.Count);

            IsBusy = false;
        }