Force Refresh in MapControl

1127
1
11-10-2021 07:55 AM
Labels (1)
StephenDavis1
New Contributor II

Hi...I cannot seem to get the MapControl in the Pro C# API to refresh. After setting the content, if I change the selection on a layer, or add labels, or whatever, the MapControl does not update. As I zoom/pan in it, the changes do not apply. It is not until I rebuild the content and set it on the MapControl (i.e. update the bound property) that the new selection or whatever shows in the MapControl. I cannot find a refresh/redraw on the mapcontrol or on any of the layers. I noticed MapView has something like that, but a MapControl in a pane on the side of the app is not going to be the current view. Is there any way to update the selection in a layer in a mapcontrol and have the UI actually show the changes without rebuilding/reapplying all of the content? Thanks so much!

Tags (3)
0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi Stephen, we moved your question here to the Pro SDK questions board.

The MapControl does not have a specific redraw method, and content and drawing is managed by your code.  A couple places to look for more ideas:

This MapControl doc section contains a lot of guidance on usage and ViewContent snippets.

Samples using the Map control can be found at:  OverviewMapControl and MagnifierWindow

0 Kudos