async void Toast_Loaded(object sender, RoutedEventArgs e) { // after load, locate, fade, and show locateInScreen(location); BitmapSource head; if (!string.IsNullOrEmpty(player) && (head = await Heads.GetPlayerHead(player)) != null) { cImage.Visibility = Visibility.Visible; cImage.Source = head; } await fade(true); hideTimer.IsEnabled = true; }
// reload the player head async void playerSelectionChanged(object sender, SelectionChangedEventArgs e) { playerHead.Source = playerList.SelectedIndex < 0 ? null : await Heads.GetPlayerHead((string)playerList.SelectedItem); }