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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the values of selected checkboxes in a group using Xamarin.Forms?


This article explains how to notify the state changes in Xamarin.Forms CheckBox.

 

You can get the checked CheckBox from collection of CheckBox by using the StateChanged event. It will be triggered while changing the state of Xamarin CheckBox and its declaration code has been updated below.

 

..
<buttons:SfCheckBox Text="Syncfusion CheckBox" StateChanged="SfCheckBox_StateChanged" />
..

 

The StateChanged event contains the following argument IsChecked, which is used to get the current state value of CheckBox as per below code snippet.

 

private void SfCheckBox_StateChanged(object sender, StateChangedEventArgs e)
{
  // e.IsChecked - Return its state either checked or unchecked
  // (sender as SfCheckBox).Text  - Return the state changed Xamarin.Forms CheckBox text.
}

See Also:

How to customize the Xamarin.Forms CheckBox

 

Available states in Xamarin.Forms CheckBox

 

How to create a Xamarin.Forms CheckBox in XAML

 

How to create a collection of Xamarin.Forms CheckBox

 

 

 

 

 

 

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile