I'm using ArcGIS runtime SDK for .Net, I have an application with only a


which contains a number of feature classes.

How can I get all the layers included in the Dynamic map service layer IN CODE in order to change the visibility of some of the layers individually?

XAML code:

<esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" Cursor="Cross" Extent="330671.7091,2854689.5845,344178.0091,2862125.3845" MouseClick="QueryPoint_MouseClick" IsEnabled="False" IsLogoVisible="False">

            <esri:ArcGISLocalDynamicMapServiceLayer ID="MYLAYERS"   Path="C:\Users\Ahmad Elsayed\Desktop\test app\MODREN UI APP\FinalMap.mpk" />


Use the layer.ServiceInfo.Layers to get the service metadata information about the sub layers. The data is available after the layer has been initialized.

You can also use the GetAllDetailsAsync() call go get ALL the detailed info about the sub layers (this is a little more expensive call since a lot of data needs to be downloaded).


  • The v100.x releases has made all this a lot simpler across different layer types with the sublayer collections – dotMorten Sep 2 '17 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.