How to perform action when CheckBox list view item is selected?

ساخت وبلاگ

Vote count: 0

I have a Xamarin.Forms project where I am using Xlabs to implement checkboxes. I can get them to appear which is great. I want to be able to do this:

void OnSelection(object sender, SelectedItemChangedEventArgs e) { if (e.SelectedItem == null) retu; var selectedStudent = ((ListView)sender).SelectedItem as Student; // set time of student checkin }

But with my check boxes. I want to be able to handle checkbox selection as it happens. From what I've seen online I can set a new boolean property of my student object selected, but that simply doesn't work with my project. Here is my current approach:

 void OnSelection(object sender, EventArgs e) { CheckBox isCheckedOrNot = (CheckBox)sender; var name = isCheckedOrNot.DefaultText; //not sure what to do here? var student = ((CheckBox)sender)... // set time of student checkin }
asked 32 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 289 تاريخ : دوشنبه 31 خرداد 1395 ساعت: 21:42