We would like to let you know that we have achieved your requirement “Swap image by program” using button click event as like below code snippet.
public class Behavior : Behavior<ContentPage>
Random random = new Random();
protected override void OnAttachedTo(ContentPage bindable)
Swap = bindable.FindByName<Button>("button");
ListView = bindable.FindByName<SfListView>("listView");
Swap.Clicked += Swap_Clicked;
private void Swap_Clicked(object sender, EventArgs e)
var contact = new Model();
contact.Image = ImageSource.FromResource("SfListViewSamples.Images.Image" + random.Next(0, 19) + ".png");
(ListView.BindingContext as ViewModel).ContactsInfo = contact;
We have attached the tested sample for your reference, please find the sample in the below link.
Please let us know whether the provided sample meets your requirement.