<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; });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.