Implementing ItemSelected

Hello, Im using the "AboutUsPageWithCards"
At the AboutUsViewModel there is a ItemSelected method: 

        public void ItemSelected(object sender)
        {
            // Do something 
        }


how do I extract the data from the object? 
properties such as:
EmployeeName
Image
Designatio
...


1 Reply 1 reply marked as answer

SS SaiGanesh Sakthivel Syncfusion Team August 3, 2020 10:24 AM UTC

Hi Or, 
 
Thank you for contacting syncfusion support. 
 
We have checked the reported query “Get the selected item data from object” from our end. We would like to inform you that you can get the data from the object by using TapCommand property in SfListview while tap the item in the view. Please refer to the following code snippet for your reference. 
 
Code snippet 
private void OnItemTapped(object obj) 
{ 
            var ItemData = (obj as Syncfusion.ListView.XForms.ItemTappedEventArgs).ItemData as Contacts; 
            App.Current.MainPage.DisplayAlert("", ItemData.ContactName + ItemData.ContactNumber , "Ok"); 
} 
 
 
We have prepared the sample as per your requirement and attached in the following link for your reference. 
 
 
Please refer to the following UG Documentation link for your reference. 
 
We hope this helps. 
 
Regards, 
SaiGanesh Sakthivel 


Marked as answer
Loader.
Up arrow icon