I am working with Desktop Version 3.0.362 in a WPF application.
I created a custom feature source that inherits from FeatureSource and a custom feature layer that inherits from FeatureLayer and uses the custom FeatureSource. I initially load data and create the features for the custom FeatureSource and the display the custom FeatureLayer in its own LayerOverlay on the map.
The user then updates properties for the business objects represented by the shapes in the above LayerOverlay. Using a try catch finally block with LayerOverlay(instance).EnterWriteLock and ExitWriteLock, I remove a number of features from the custom FeatureSource and create new features that I then add into the custom FeatureSource. I then call a map.Refresh().
The first time this happens, everything works just fine and the map rerenders appropriately. If the user then tries to submit a second change without closing and reopening the form completely, the map will not refresh.
Interestingly, though, after the second change, there is a call to the DrawCore method of my custom FeatureLayer and the changed features and their assigned zoom levels and custom styles all reflect the changed information. They just don't appear on the map.
The map does refresh and display the shapes correctly if I pan or zoom.
Once again, the map refreshes correctly after the first change, and never refreshes after any subsequent changes.
What can I do to fix this?
Thank you for your help.