private void MyDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs args) {...}
<esri:FeatureDataGrid x:Name="MyDataGrid" SelectionChanged="MyDataGrid_SelectionChanged" ... </esri:FeatureDataGrid>
IEnumerable<Graphic> myGraphics = MyDataGrid.SelectedGraphics; Graphic graphic = myGraphics.Last<Graphic>(); MyMap.ZoomTo(graphic.Geometry);
MyMap.PanTo(graphic.Geometry);
<esri:FeatureLayer ID="Sewer_Lines" Renderer="{StaticResource Your-own-Renderer}" Url="Your-own-url" OutFields="*" MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown">
<esri:FeatureDataGrid x:Name="MyDataGrid" Map="{Binding ElementName=MyMap}" GraphicsLayer="{Binding ElementName=MyMap, Path=Layers.[Sewer_Lines]}" SelectionChanged="MyDataGrid_SelectionChanged" />
Thank you Jennifer for the reply but Auto Zoom to Selected feature is not working .
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.