Наследование: Xamarin.Forms.ContentView
Пример #1
0
        public async Task WillBeActive()
        {
            var fileSystem = DependencyService.Get<IFileSystem>();
            var content = ((ImageViewModel)this.BindingContext);
            var imageName = content.ImageName;

            if (fileSystem.FileExists(imageName) == false)
            {
                var imageUrl = ((ImageViewModel)this.BindingContext).ImageUrl;

                Device.BeginInvokeOnMainThread(() => {
                    Content = new SpinnerView() { IsBusy = true };
                });

                await DownloadAndSaveFile(imageUrl, imageName);

                Device.BeginInvokeOnMainThread(() => {
                    Content = _photoView;
                    _photoView.ImageName = imageName;
                });
            }
        }
Пример #2
0
 public SingleImagePage()
 {
     Content = new SpinnerView() { IsBusy = true };
 }