private void OnWidgetSelectedGraphicChange(object sender, SelectedItemChangeEventArgs args) { if (sender != this) { LoadWidgetWithSelection(); } }
private void IdentifyResultGrid_SelectedItemChange(object sender, SelectedItemChangeEventArgs args) { Graphic feature = args.Feature; if (feature != null) { HighlightSelectedGraphic(feature); } }
private void SocialMediaGrid_SelectedItemChange(object sender, SelectedItemChangeEventArgs args) { this.highlighGraphic.Geometry = args.Feature.Geometry; this.MapControl.PanTo(args.Feature.Geometry); if (!graphicsLayer.Graphics.Contains(highlighGraphic)) { graphicsLayer.Graphics.Insert(0, highlighGraphic); } }
private void QueryResultGrid_SelectedItemChange(object sender, SelectedItemChangeEventArgs args) { Graphic feature = args.Feature; if (feature != null) { /* * If filter the results with changing map extent, remove this block * Otherwise, add this block to pan the map to the selected graphic. * But do not do it at the first load when the map just zooms to the * results, otherwise the map will be hanging without response. * (See MapControl_ExtentChanged handler) */ HighlightSelectedGraphic(feature); } }