12-14-2021
05:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-14-2021
05:43 AM
Use this event is not recommended. But if you have no another choice, you need to be careful in handling of this event.
If you create any document modification, the event is fired again and again. Up to StackOverflowException.
In this case i necessary to check if you are currently handling this event. This asample is not complete, but demonstrates how to achieve this.
private void OnChange (...){
if(currentlyHandling) return;
currentlyHandling = true;
//DO SOMETHING
currentlyHandling = false;
}