<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"> <ComboBox x:Name="LayerNames"> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Value.Name}"/> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> <ComboBox x:Name="FieldNames" DataContext="{Binding ElementName=LayerNames, Path=SelectedItem}" ItemsSource="{Binding Value.Fields}"> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Name}"/> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> </StackPanel>
var layer = new ArcGISDynamicMapServiceLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer" }; layer.GetAllDetails((a, b) => { if (b != null) MessageBox.Show(b.Message); else LayerNames.ItemsSource = a; });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.