Forum Xamarin Xamarin.Forms

FFImageLoading(CachedImage) Trigger

DimChrisDimChris USMember ✭✭✭✭
edited September 17 in Xamarin.Forms

Hello and hope doing well. Ii there any way to trigger CachedImage Transformation?
Example, i have a property status. If status value is False to transform cached image to grayscale.
I have already tried this, but unfortunately it doesn't change my image.

<ff:CachedImage
  Source="{Binding ImageUrl}"
  HeightRequest="{Binding ImageDynamicHeight}">
   <ff:CachedImage.Triggers>
     <DataTrigger TargetType="ff:CachedImage"
      Binding="{Binding Status}" Value="True">
       <Setter Property="Transformations">
         <Setter.Value>
           <ffTrans:GrayscaleTransformation />
          </Setter.Value>
        </Setter>
       </DataTrigger>
   </ff:CachedImage.Triggers>
</ff:CachedImage>

Any ideas how can i make this to work?

Best Answer

Answers

  • DimChrisDimChris USMember ✭✭✭✭

    Thank you LeonLu!! Quick and powerful support! Your example works perfect! Thank you again!

Sign In or Register to comment.