This content has been marked as final. Show 2 replies
Make a loop on yourMap.Layers, for each layer of type 'FeatureLayer' set layer.Visible to false.
Thanks! Got it. That is exactly where I was headed. Here's the result. Works like a charm.
Dim myLayerCollection As ESRI.ArcGIS.Client.LayerCollection = MyMap.Layers 'Dim myLayerCount As Double = myLayerCollection.Count 'MessageBox.Show("Number of Layers in the Map:" + myLayerCount.ToString) Dim fl As FeatureLayer For Each l In myLayerCollection If TypeOf (l) Is FeatureLayer Then fl = l fl.Visible = False End If Next