Solved! Go to Solution.
I have got the listbox binded in code to chosen mapservice layer: listbox.ItemsSource = layerInfoArray.
Thx for your answer
But I mean layers in a mapservice, like in this example: SubLayerList.
The binding to mapservice's visible layers (on map!) should be binded in code behind. The layers' visibility on map works but the checkbox need to be in sync with that, and that is not the case.
When I close the sublayer list and open it again and initialize the mapservice again, then the defaultvisibility is binded to the checkbox IsChecked, and that is not the truth, because more layers are visible than the default.
I'm using ArcGIS 9.3.1 REST API 1.2 and the legend control is only available in arcgis 10?
So how could I get the dynamic layer's VisibleLayers binding to their checkboxes in code when the layer is being Initialized. The legend is unnecessary at this point.