Category / Section
How to get the values of selected checkboxes in a group using Xamarin.Forms?
1 min read
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