private void passiveImage_Loaded(object sender, RoutedEventArgs e)
        {
            Image       image       = sender as Image;
            BitmapImage bitmapImage = new BitmapImage(new Uri(AppConstants.ChampionPassiveIconUrl() + champion.Value.passive.image.full));

            image.Source = bitmapImage;
        }
示例#2
0
        private void abilitiesHub_Loaded(object sender, RoutedEventArgs e)
        {
            passiveHeaderTextBlock.Text = champion.Value.passive.name;
            BitmapImage passiveBitmapImage = new BitmapImage(new Uri(AppConstants.ChampionPassiveIconUrl() + champion.Value.passive.image.full));

            passiveHeaderImage.Source    = passiveBitmapImage;
            ability1HeaderTextBlock.Text = champion.Value.spells[0].name;
            BitmapImage ability1BitmapImage = new BitmapImage(new Uri(AppConstants.SpellIconUrl() + champion.Value.spells[0].image.full));

            ability1HeaderImage.Source   = ability1BitmapImage;
            ability2HeaderTextBlock.Text = champion.Value.spells[1].name;
            BitmapImage ability2BitmapImage = new BitmapImage(new Uri(AppConstants.SpellIconUrl() + champion.Value.spells[1].image.full));

            ability2HeaderImage.Source   = ability2BitmapImage;
            ability3HeaderTextBlock.Text = champion.Value.spells[2].name;
            BitmapImage ability3BitmapImage = new BitmapImage(new Uri(AppConstants.SpellIconUrl() + champion.Value.spells[2].image.full));

            ability3HeaderImage.Source   = ability3BitmapImage;
            ability4HeaderTextBlock.Text = champion.Value.spells[3].name;
            BitmapImage ability4BitmapImage = new BitmapImage(new Uri(AppConstants.SpellIconUrl() + champion.Value.spells[3].image.full));

            ability4HeaderImage.Source = ability4BitmapImage;

            passiveHubSection.Width  = 500;
            ability1HubSection.Width = 500;
            ability2HubSection.Width = 500;
            ability3HubSection.Width = 500;
            ability4HubSection.Width = 500;
        }