Search code examples
xamarin.formsffimageloading

Using FFImageloading RoundedTranformation for dynamic fields.


Hi I want to apply RoundedTransformation to dynamically created CachedImage in XamarinForms.

here is code for dynamic creation of CachedImage

var imgProd = new CachedImage { Source = temp.imgSource, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Margin = 0, DownsampleHeight = vm.featureStackHeight, DownsampleToViewSize = true, Aspect = Aspect.Fill};

Solution

  • Sure, just go:

    imgProd.Transformations.Add(new CircleTransformation());