This sample loads an ArcGISDynamicMapServiceLayer.
It determines the layers in the map service and presents them as checkboxes that can be used to toggle their visibility.

Layer List :