Change Border, Background, Leader Line of Callout

05-03-2019 10:23 AM
New Contributor III

Runtime SDK 100.5.

I'm using callouts to show information after a user clicks on the map (MyMapView.ShowCalloutAt), and I've set the content as a custom element, but the callout still has a white border around it, and the leader line is white.  How can I customize the border and leader line of the callout?

0 Kudos
3 Replies
Esri Contributor


You can't set the properties of the callout shown using GeoView.ShowCalloutAt. You can, however, create a Callout object, set its display properties, and add it to the map view. Here's an example:

// Create a Callout (FrameworkElement), set its content and appearance.
Callout customCallout = new Callout
    Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.CornflowerBlue),
    BorderBrush = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.PaleVioletRed),
    BorderThickness = new System.Windows.Thickness(5,5,5,3),
    Content = "Custom content goes here"
// Set the callout location on the display using an attached property on GeoView.
GeoView.SetViewOverlayAnchor(customCallout, mapLocation);

// Add the callout to the map view overlay collection.

I hope that helps! -Thad

New Contributor III

Thanks for the info. I'll give that a shot.

0 Kudos
MVP Regular Contributor

Morten Nielsen‌ showed in this thread Popups in ArcGIS Runtime SDK for .NET how to make changes in Xaml

0 Kudos