I have images in a listview and to start it off I grayscale them all.
<ffimageloading:CachedImage Source="{Binding Image}" x:Name = "Images">
<ffimageloading:CachedImage.Transformations >
<fftransformations:GrayscaleTransformation/>
<fftransformations:CircleTransformation/>
</ffimageloading:CachedImage.Transformations>
</ffimageloading:CachedImage>
<Button Command="{Binding ImageClick}" CommandParameter="{x:Reference Images}" BorderRadius="7" />
In my mainviewmodel i have a command.
this.ImageClick = new Command(ClickedEvent);
And here i know what image that was clicked, how can i now disable grayscale on that particular image? Without disabling the circular transformation.
void ClickedEvent (object sender)
{
var clickedImage = sender as CachedImage;
var rowData = clickedImage.BindingContext as MyClass;
// Now i am unsure on how to proceed
}
public class MyClass
{
public string Image {get;set;}
public bool GrayScaleVisibility {get;set;}
}