when i add an eventhandler to the document on layer activate to show custom properties from layer in a dockerUi, after some activation of layer, the event stop to work
I'm afraid it is nothing you can do.. This looks to be a Corel problem. I tested such events in a C# docker but none of them had infinite life. Look at this post where I described events behavior in Corel X8: http://community.coreldraw.com/sdk/f/40/t/54331#pi1484=3