private void SfCheckBox_StateChanged(object
sender, Syncfusion.XForms.Buttons.StateChangedEventArgs e)
{
var checkBox =
(sender as SfCheckBox).BindingContext as Contacts;
lblSelectedAssignee.Text += "selectionChanged|";
ObservableCollection <object>
items = new ObservableCollection<object>();
if (e.IsChecked ==
true)
{
listAssignee.SelectedItems.Add(checkBox);
items = listAssignee.SelectedItems;
}
else if(e.IsChecked == false)
{
listAssignee.SelectedItems.Remove(checkBox);
items = listAssignee.SelectedItems;
}
for
(int i = 0; items.Count > i; i++)
{
var item = items[i] as Contacts;
item.IsDone =
true;
selectAssignee +=
"" + item.ContactName +
"|";
if (i == items.Count - 1)
lblSelectedAssignee.Text += lblSelectedAssignee.Text + item.ContactName + "
. ";
else
lblSelectedAssignee.Text += lblSelectedAssignee.Text + item.ContactName + "
, ";
}
entryAssignee.Text = selectAssignee;
}
|