windowsforms-devexpress-dot-xtraeditors-dot-checkedit-859ce74b.md
Fires after the CheckEdit.Checked property value has been changed.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event EventHandler CheckedChanged
<DXCategory("Events")>
Public Event CheckedChanged As EventHandler
The CheckedChanged event's data class is EventArgs.
The editor’s CheckedChanged event is the equivalent of the RepositoryItemCheckEdit.CheckedChanged event available from the CheckEdit.Properties object. When you add/remove an event handler for the current event, you actually affect the RepositoryItemCheckEdit.CheckedChanged event.
The code sample below allows you to determine if the checked state changed programmatically, or if a user changed it manually.
checkEdit1.Click += checkEdit1_Click;
checkEdit1.CheckedChanged += checkEdit1_CheckedChanged;
bool IsClick = false;
private void checkEdit1_Click(object sender, EventArgs e)
{
IsClick = true;
}private void checkEdit1_CheckedChanged(object sender, EventArgs e)
{
if (IsClick)
{
// a user has clicked the CheckEdit
// react to user's action
IsClick = false;
}
}
Private checkEdit1.Click += AddressOf checkEdit1_Click
Private checkEdit1.CheckedChanged += AddressOf checkEdit1_CheckedChanged
Private IsClick As Boolean = False
Private Sub checkEdit1_Click(ByVal sender As Object, ByVal e As EventArgs)
IsClick = True
End Sub
Private Sub checkEdit1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
If IsClick Then
' a user has clicked the CheckEdit
' react to user's action
IsClick = False
End If
End Sub
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CheckedChanged event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
seFontSize.EditValueChanged += (s, e) => RaiseChanged();
ceRepeat.CheckedChanged += (s, e) => RaiseChanged();
}
AddHandler seFontSize.EditValueChanged, Sub(s, e) RaiseChanged()
AddHandler ceRepeat.CheckedChanged, Sub(s, e) RaiseChanged()
End Sub
See Also