Create composite symbol

724
2
Jump to solution
06-22-2017 06:58 PM
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;
Reply
0 Kudos
1 Solution

Accepted Solutions
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
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

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