Example #1
0
        public async Task LoadAsync()
        {
            if (Model != null && !string.IsNullOrEmpty(Model.DowloadUrl))
            {
                using (WebClient client = new WebClient())
                {
                    client.OpenReadCompleted += new OpenReadCompletedEventHandler((sender, e) => {
                        Loading.Visibility = Visibility.Hidden;
                    });

                    var stream = await client.OpenReadTaskAsync(Model.DowloadUrl);

                    PictureImage.Source = Ultilities.ConvertStreamToBitmapImage(stream);
                }
            }
        }