Create composite symbol

1006
2
Jump to solution
06-22-2017 06:58 PM
YuriGvozdev
New Contributor II
I need to create a composite symbol based on bitmap and text, which should be in the lower right corner of the bitmap. When creating a symbol with standard text, the text is inserted into the center. How to put it in the lower right corner?

PictureMarkerSymbol _ps = new PictureMarkerSymbol(new Uri(pathStr));
 var textsymbol = new TextSymbol()
 {

 HorizontalAlignment = Esri.ArcGISRuntime.Symbology.HorizontalAlignment.Right,
 VerticalAlignment = Esri.ArcGISRuntime.Symbology.VerticalAlignment.Bottom,

 Text = count.ToString(),
 FontFamily = "Arial",
 Size = 9,
 Color = Colors.Red,
 FontStyle = Esri.ArcGISRuntime.Symbology.FontStyle.Oblique

 };
 csymbol.Symbols.Add(_ps);
 csymbol.Symbols.Add(textsymbol);
 Symbol symbol = csymbol;
0 Kudos
1 Solution

Accepted Solutions
NagmaYasmin
Occasional Contributor III

Hi Yuri,

You may use OffsetX/OffsetY  within the TextSymbol constructor to position the text inside the bitmap.

TextSymbol Class 

Hope that helps.

Nagma

View solution in original post

2 Replies
NagmaYasmin
Occasional Contributor III

Hi Yuri,

You may use OffsetX/OffsetY  within the TextSymbol constructor to position the text inside the bitmap.

TextSymbol Class 

Hope that helps.

Nagma

YuriGvozdev
New Contributor II
I already found this solution myself. Thank you.
0 Kudos