Exemple #1
0
        public Task <FormsCAKeyFrameAnimation> LoadImageAnimationAsync(ImageSource imagesource, CancellationToken cancelationToken = default(CancellationToken), float scale = 1)
        {
            FormsCAKeyFrameAnimation animation = ImageAnimationHelper.CreateAnimationFromFileImageSource(imagesource as FileImageSource);

            if (animation == null)
            {
                Controls.Internals.Log.Warning(nameof(FileImageSourceHandler), "Could not find image: {0}", imagesource);
            }

            return(Task.FromResult(animation));
        }
Exemple #2
0
        public Task <FormsCAKeyFrameAnimation> LoadImageAnimationAsync(ImageSource imagesource, CancellationToken cancelationToken = default(CancellationToken), float scale = 1)
        {
            FormsCAKeyFrameAnimation animation = ImageAnimationHelper.CreateAnimationFromFileImageSource(imagesource as FileImageSource);

            if (animation == null)
            {
                Forms.MauiContext?.CreateLogger <FileImageSourceHandler>()?.LogWarning("Could not find image: {imagesource}", imagesource);
            }

            return(Task.FromResult(animation));
        }