private async void SetupControl()
        {
            IReadOnlyList <AppListEntry> appListEntry = await optionalPackage.GetAppListEntriesAsync();

            AppListEntry firstEntry = appListEntry.First();
            var          filestream = await(firstEntry.DisplayInfo.GetLogo(new Windows.Foundation.Size(1, 1))).OpenReadAsync();
            BitmapImage  logo       = new BitmapImage();
            await logo.SetSourceAsync(filestream);

            PackageLogo.Source = logo;

            PackageName.Text = firstEntry.DisplayInfo.DisplayName;
        }
Beispiel #2
0
        private async void SetupControl()
        {
            IReadOnlyList <AppListEntry> appListEntry = await deployedPackage.GetAppListEntriesAsync();

            if (appListEntry.Count > 0)
            {
                AppListEntry firstEntry = appListEntry.First();
                var          filestream = await(firstEntry.DisplayInfo.GetLogo(new Windows.Foundation.Size(1, 1))).OpenReadAsync();
                BitmapImage  logo       = new BitmapImage();
                await logo.SetSourceAsync(filestream);

                PackageLogo.Source = logo;
                PackageName.Text   = firstEntry.DisplayInfo.DisplayName;
            }
            else
            {
                PackageName.Text = deployedPackage.Id.FullName;
            }

            ProgressBar.IsIndeterminate = true;
        }