Event in Xamarin.Android Chart(SfChart)
3 Sep 2020 / 1 minute to read
StateChanged event
Occurs when the value(state) of the Checked
property is changed by either touching the check box or setting the value to the Checked
property using C# code. The event arguments are of type StateChangedEventArgs
and expose the following property:
checkBox = new SfCheckBox(this);
checkBox.Text = "Unchecked State";
checkBox.IsThreeState = true;
checkBox.StateChanged += CheckBox_StateChanged;
private void CheckBox_StateChanged(object sender, StateChangedEventArgs e)
{
if (e.IsChecked.HasValue && e.IsChecked.Value)
{
checkBox.Text = "Checked State";
}
else if(e.IsChecked.HasValue && !e.IsChecked.Value)
{
checkBox.Text = "Unchecked State";
}
else
{
checkBox.Text = "Indeterminate State";
}
}
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page