protected override void SetupOnBeforeImageLoading(TaskParameter imageLoader) { base.SetupOnBeforeImageLoading(imageLoader); #if __IOS__ int width = (int)this.Bounds.Width; int height = (int)this.Bounds.Height; #elif __ANDROID__ int width = this.Width; int height = this.Height; #endif if ((!string.IsNullOrWhiteSpace(ImagePath) && ImagePath.ToLower().Contains("svg")) || ImageStream != null) { imageLoader.WithCustomDataResolver(new SvgDataResolver(width, height, true, ReplaceStringMap)); } if (!string.IsNullOrWhiteSpace(LoadingPlaceholderImagePath) && LoadingPlaceholderImagePath.ToLower().Contains("svg")) { imageLoader.WithCustomLoadingPlaceholderDataResolver(new SvgDataResolver(width, height, true, ReplaceStringMap)); } if (!string.IsNullOrWhiteSpace(ErrorPlaceholderImagePath) && ErrorPlaceholderImagePath.ToLower().Contains("svg")) { imageLoader.WithCustomErrorPlaceholderDataResolver(new SvgDataResolver(width, height, true, ReplaceStringMap)); } }