You can use the marked events:
<CheckBox Name="myCheckBox"
Content="I am a checkbox!"
Checked="myCheckBox_Checked"
Unchecked="myCheckBox_Unchecked" />
And the code for these events:
private void myCheckBox_Checked(object sender, RoutedEventArgs e)
{
}
private void myCheckBox_Unchecked(object sender, RoutedEventArgs e)
{
}
EDIT: Just noticed that you have the contents for the flags as "{Binding posID}", so something you can do (since you have a list of flags) is in the checked events, there is something like:
if (sender != null)
{
int posID = Convert.ToInt32(((CheckBox)sender).Name);
}
This will give you a "posID" and you can do what you need .: D
source
share