private async void LoadCharacters() { Characters = await WesterosManager.GetCharactersAsync(); Characters = Characters.FindAll(c => c.Name != ""); // Replace all empty Culture Characters .Where(x => x.Culture == "") .ToList() .ForEach(x => { x.Culture = "Unidentified"; }); // Replace all empty Born Characters .Where(x => x.Born == "") .ToList() .ForEach(x => { x.Born = "Unmarked"; }); // Sort list Characters = Characters.OrderBy(x => x.Name).ToList(); lvwCharacters.ItemsSource = Characters; CharacterDetail.ListCharacters = Characters; ShowContent(); }
private async void TestGet() { Characters = await WesterosManager.GetCharactersAsync(); }