private void graphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs args) { System.Windows.Browser.HtmlPage.Window.Navigate((System.Uri)args.Graphic.Attributes["link"], "_blank"); }
Handle the GraphicsLayer.MouseLeftButtonDown event with the following code:private void graphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs args) { System.Windows.Browser.HtmlPage.Window.Navigate(new System.Uri((string)args.Graphic.Attributes["link"], System.UriKind.Absolute), "_blank"); }Setting the target to "_blank" ensures that you don't leave the app by clicking.If you want to make the maptip more hyperlink friendly, you'll probably want to use the maptip included in the toolkit instead of the default ESRI.ArcGis.Client.Maptip control.
private void graphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs args) { System.Windows.Browser.HtmlPage.Window.Navigate(new System.Uri((string)args.Graphic.Attributes["link"], System.UriKind.Absolute), "_blank"); }
<esri:GraphicsLayer> <esri:GraphicsLayer.MapTip> <Border Background="White" esri:GraphicsLayer.MapTipHideDelay="0:0:0.5"> <StackPanel Margin="10"> <TextBlock Text="More info:" /> <HyperlinkButton NavigateUri="{Binding [Link]}" TargetName="_blank" /> </StackPanel> </Border> </esri:GraphicsLayer.MapTip> </esri:GraphicsLayer>
If you want to make the maptip more hyperlink friendly, you'll probably want to use the maptip included in the toolkit instead of the default ESRI.ArcGis.Client.Maptip control.
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.