We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Binding an Image to ListView for Selection

Thread ID:

Created:

Updated:

Platform:

Replies:

131178 Jun 27,2017 12:13 AM UTC Jun 28,2017 04:55 AM UTC Xamarin.Forms 3
loading
Tags: SfListView
pumaprog
Asked On June 27, 2017 12:13 AM UTC

Hello.  I have been following the guide for customizing selected items, but am stuck at binding to the image in C#.  The XAML snippet doesn't help me much, so I am looking for some C# examples for adding check marks to a listview for Selected Items.

Dinesh Babu Yadav [Syncfusion]
Replied On June 27, 2017 05:17 AM UTC

Hi Tommy, 
 
Thank you for using Syncfusion Products. 
 
The reported requirement “Need to show a image for the selected items in SfListView” can be achieved by customizing the view in the ItemTemplate property and in order to change the appearance of selected items, temp(Example: IsSelected) property should be maintained in Model class and bind to an image element in the ItemTemplate. And IsSelected property of underlying data item has been updated based on the selection from SelectionChanged event of SfListView and therefore the selectedimage’s source is changed by using SelectionBoolToImageConverter converter. For your reference, we have attached the sample which shows a tick mark image when an item is selected as per the reported requirement and you can download it from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 


pumaprog
Replied On June 27, 2017 12:47 PM UTC

Thank you Dinesh.

Dinesh Babu Yadav [Syncfusion]
Replied On June 28, 2017 04:55 AM UTC

Hi Tommy,  
  
Thanks for the update.  
  
Regards,  
Dinesh Babu Yadav 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;