Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.
public void LabelOff( IActiveView view, IGeoFeatureLayer geoFeatureLayer ) {
    IAnnotateLayerPropertiesCollection annotationProperties =
        geoFeatureLayer.DisplayAnnotation = false;
        // Which one?
        view.PartialRefresh( esriViewDrawPhase.esriViewGraphics, 
            geoFeatureLayer, null );

I use this code to remove labels for one specific layer. It only works with the view.Refresh(). Shouldn't the PartialRefresh() also work (without calling the view.Refresh()?)

share|improve this question
I'm not in front of my computer now (so I can't check), but I'd play with the esriViewDrawPhase parameter. Perhaps esriViewDrawPhase.esriViewGeography will work. You're right, though, the PartialRefresh should be enough. – Michael Todd Nov 30 '11 at 22:31
Tried them all and I can report that esriViewAll works (but isn't that the same as Refresh()?) – Chaz Dec 2 '11 at 15:15
Probably. But, if it works, I'd go with it. You can't get any deeper in the process than a refresh will do, and I can't imagine that doing one takes significantly longer than the other. – Michael Todd Dec 2 '11 at 18:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.