Hi Dominique,
Thank you for the response.
The reason why I'm asking how to stop legend refresh is that Lagend control refreshes not only in these two cases.
I have 'Navigation' toolbar in my application and I'm using Draw object for 'Zoom-In' tool to draw rectangle. There are several another tools which use different Draw objects.
When I changed something in Legend control (expanded some layers/sublayers, changed visibility, etc.) and then clicking some tool in toolbar it causes Legend control to refresh and I'm loosing all changes I did in TOC.
I did some reasearch and found that Legend refresh happens when I'm changing some Draw object's properties in my code (for exaample, if I'm switching _myDrawObject.IsEnabled from true to false).
It looks for me like a third kind of refresh... and I have to find some way how to prevent this type of refresh.
Thanks,
Alexander.