Some labels set as TextSymbol like;if (the.Attributes[LabelGraphic] != null)
{
var graphic = the.Attributes[LabelGraphic] as Graphic;
var symbol = graphic.Symbol as TextSymbol;
symbol.Text = the.Attributes["POW"].ToString();
labbelsLayer.Graphics.Add(graphic);
}
what I'm trying to do is specify a control template to style this bugger on the presentation side, something like<esri:TextSymbol x:Key="theSymbol">
<esri:TextSymbol.ControlTemplate>
<ControlTemplate>
<Border Background="White" Padding="10">
<TextBlock Text="{Binding symbol.Text}"/>
</Border>
</ControlTemplate>
</esri:TextSymbol.ControlTemplate>
</esri:TextSymbol>
I tried to do something like;TextSymbol = LayoutRoot.Resources["theSymbol"] as TextSymbol;
but no joy, maybe I'm not forming correctly? Any advice or tips?