Search code examples
c#.netarcgisarcgis-runtime

ARCGIS Runtime for .NET How to set background color for Text Symbol in SceneView


My code looks like this:

            TextSymbol ts = new TextSymbol()
            {
                Font = new SymbolFont("Arial", 18),
                BackgroundColor = Color.FromArgb(160, 255, 255, 255),
                HorizontalTextAlignment = HorizontalTextAlignment.Center,
                VerticalTextAlignment = VerticalTextAlignment.Baseline,
                Text = icon.description,
                XOffset = 0,
                YOffset = -icon.height
            };


            var pointGraphic = new Graphic(GeometryEngine.Project(new MapPoint(icon.Longitude, icon.Latitude, 100, wgs84), MyViewBase.SpatialReference), ts);

The text symbol shows up as expected on the MapView, but the SceneView there is no background box and the text is not centered under the appropriate lat/long.

Is this capability not available for SceneView? If not, how can I do this?


Solution

  • Unfortunately text background is not supported in the first v100 release. We hope to have it in the next update, but it's not be in yet, so I can't with 100% certainty promise it yet.

    We do however support outline color, so perhaps you can use that instead?