private void Button_IsCheckedChanged(object sender, Telerik.XamarinForms.Primitives.CheckBox.IsCheckedChangedEventArgs e)
 {
     if (e.NewValue == true)
     {
         foreach (var q in _survey.SurveyAnswers)
         {
             if (q._checks != null)
             {
                 foreach (var chk in q._checks)
                 {
                     if (chk == sender)
                     {
                         foreach (var unchk in q._checks)
                         {
                             if (unchk != sender)
                             {
                                 unchk.IsChecked = false;
                             }
                         }
                     }
                 }
             }
         }
     }
 }
示例#2
0
 private void GroupHeaderCheckbox_OnIsCheckedChanged(object sender, Telerik.XamarinForms.Primitives.CheckBox.IsCheckedChangedEventArgs e)
 {
     if (sender is RadCheckBox cb && cb.BindingContext is GroupHeaderContext context)
     {
         foreach (var item in context.Group.ChildItems)
         {
             if (e.NewValue == true)
             {
                 context.Grid.SelectItem(item);
             }
             else
             {
                 context.Grid.DeselectItem(item);
             }
         }
     }
 }