<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; });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.