The Changed event only fires if you make changes in the context of your application.
For identifying changes external to your application you will need to poll FindChangedItems.
Thank you for help!
Another question. How I should handle removed elements.
I have cache of elements in my app. Then element was removed from AF, I should also remove it from cache.
I get removed element in such way
AFElement removedElement = change.FindObject( afSystem ) as AFElement;
Then I want just
cache.Remove( removedElement );
but removedElement is null. So exception raises.
ADDED: I use AFElement.FindElement(afSystem, change.ID) now all works
The AFChangeInfo for the removed element will have the Action=Removed, the Identity=AFElement, and the ID=IDofElement. From this information you should be able to find the element in you cache and remove it.