Try a good old reflection?
StackFrame lastCall = new StackFrame(3); if (lastCall.GetMethod().Name != "OnClick") { // Programmatic Code } else { // User Code }
The call column is as follows:
- Onclick
- set_Checked
- Oncheckchanged
So you need to go back 3 to distinguish who SET is installed
Remember that there is something that can go wrong with the call stack, it is not 100% reliable, but you can expand this bit a bit to find the source.
Arena source share