mercredi 21 juin 2017

Distinguish between click and binding update on checkbox

I have a strange situation with a binding that needs addressing. I have a checkbox that is bound to an inherited virtual function from a base class like so:

Checked="CheckboxStatusChanged"
Unchecked="CheckboxStatusChanged"

Inside the status change, a variable "enabled" is set in MainWindow and a json file that is shared across machines. However, when this view is loaded on startup, the "enabled" value is loaded from the json, and thus triggers the binding.

The issue is that the "Checked" event fires when the binding updates. For a particular purpose, I need to know when a user manually triggers the checkbox, and not when a binding causes its update.

I've dug into the event args and sender parameters, but with no luck. Any suggestions would be wonderful!




Aucun commentaire:

Enregistrer un commentaire