Display simple line under a layer

209
0
02-02-2022 06:46 AM
dylanamaro
New Contributor II

Hello,

I did a line on a Background Callout but i want the line to be under the layer and not hover. Can someone help me to find a solution to put it under the layer or something like that ?

 

dylanamaro_0-1643812899929.png

My background is :

dylanamaro_1-1643813084913.png

 

and the code for that is :

 

var stroke = new CIMSolidStroke
                {
                    Color = CIMColor.CreateRGBColor(0, 0, 0),
                    Name = "Black stroke",
                    Width = 1
                };
                var fill = new CIMSolidFill
                {
                    Color = CIMColor.CreateRGBColor(0, 0, 0),
                    Name = "Black fill",
                    PrimitiveName = "Black fill",
                };

                CIMLineSymbol myLineSymbol = new CIMLineSymbol
                {
                    SymbolLayers = new[] { (CIMSymbolLayer)stroke, fill }
                };

                CIMBackgroundCallout backgroundCallout = new CIMBackgroundCallout
                {
                    LeaderLineSymbol = myLineSymbol,
                    LineStyle = LeaderLineStyle.Base,
                    BackgroundSymbol = polySymbol,
                    Gap = 2,
                    Margin = new CIMTextMargin
                    {
                        Left = 8,
                        Right = 8,
                        Bottom = 1,
                        Top = 1
                    }
                };

 

0 Kudos
0 Replies