<Button Content="Change Selection Color" VerticalAlignment="Top" Click="Button_Click" />
private void Button_Click(object sender, RoutedEventArgs e) { FeatureLayer layer = MyMap.Layers["MyLayer"] as FeatureLayer; var brush = new SolidColorBrush(Colors.Magenta); layer.SelectionColor = brush; }
<Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" SelectionMode="Rectangle"/> </Grid.Resources> <esri:Map x:Name="MyMap" Background="White"> <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /> <esri:FeatureLayer ID="MyLayer" SelectionColor="Yellow" Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0"/> </esri:Map> <Button Content="Select" Command="{Binding Select}" CommandParameter="new" DataContext="{StaticResource MyEditor}" VerticalAlignment="Top" HorizontalAlignment="Center"/> </Grid>
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.