It's strange. The visibility of layer is changed directly by legend control in HandleLeftMouseDown function. It calls Map.set_LayerVisible which will automatically trigger map redraw. I don't see what can go wrong here. Perhaps make sure that you add layer with Legend.Layers.Add and not Map.AddLayer. Try to handle LayerCheckboxClicked event and call Map.get_LayerVisible/set_LayerVisible/Map.Redraw and see if it works for you. Make sure that map isn't locked (Map.IsLocked). Don't know what else to suggest.
↧