Пример #1
0
        /// <summary>
        /// Loads async all books from the API and updates the stored books
        /// </summary>
        public async Task LoadDataAsync(MasterDetailsViewState viewState)
        {
            SampleItems.Clear();
            var books = await GameOfThronesDataService.GetAllBooksAsync();

            SubstitueEmptyAttributes(books);

            if (viewState == MasterDetailsViewState.Both)
            {
                if (SampleItems != null)
                {
                    Selected = SampleItems.First();
                }
            }
        }