Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

FFimageloading CachedImage not showing

Hey guys, I'm using an API to get a cached image ( I'm able to get the image from the API) and displaying it like so:
var contentPage = new ContentPage();
var layout = new StackLayout();
var profilePhoto = new CachedImage
Aspect = Aspect.AspectFill,
Transformations = new System.Collections.Generic.List<FFImageLoading.Work.ITransformation>()
new BlurredTransformation(p.blurAmount),
new CircleTransformation(1, "e8e8e8")
WidthRequest = 222,
HeightRequest = 222,
DownsampleToViewSize = true,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.CenterAndExpand,
Source = p.Image.Source //(p is the object which contains an Image attribute which is assigned the CachedImage response from API )
contentPage.content = layout;

now I have added labels as well to the content page and they show up but the image is blank. I have added CachedImageRenderer.Init(); in my MainActivity.cs like so:
protected override void OnCreate(Bundle bundle)

TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;


global::Xamarin.Forms.Forms.Init(this, bundle);
CachedImageRenderer.Init(); //<<--------------Here
LoadApplication(new App());

It just doesn't show up, and there aren't any errors either. What could the issue be?

Sign In or Register to comment.