Hi,I'm build a coordinate search to my appication. To do so, I'm using the following MarkerSymbol, to show the coordinates and a image that represents the point.<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
<esri:MarkerSymbol x:Key="MarcadorCustomizadoFerramentaCoordenadas" OffsetX="8" OffsetY="31">
<esri:MarkerSymbol.ControlTemplate>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/ViewModel;component/RecursosGraficos/Imagens/marcadorCoordenadas.png"/>
<Border BorderBrush="Green" Background="White" BorderThickness="1">
<TextBlock Text="{Binding [Coordenadas]}" TextAlignment="Left" VerticalAlignment="Center"
FontFamily="Portable User Interface"/>
</Border>
</StackPanel>
</ControlTemplate>
</esri:MarkerSymbol.ControlTemplate>
</esri:MarkerSymbol>
</ResourceDictionary>
The problem in this code is that the Binding get no value. This Binding was originaly on a MapTip code on the GraphicsLayer, and there it works fine.Does Anyone knows how to make it work as a Graphic Symbol?This is how I set the Marker as Symbol of the Graphic:private void AdicionaPontoNoGraficsLayer(MapPoint ponto)
{
mapaEmExecucao.PanTo(ponto);
Graphic bandeiraBuscaPorCoordenadas = new Graphic();
bandeiraBuscaPorCoordenadas.Attributes.Add("Coordenadas",
string.Format("X: {0}\nY: {1}",
Math.Round(ponto.X, 4),
Math.Round(ponto.Y, 4)));
bandeiraBuscaPorCoordenadas.Geometry = ponto;
bandeiraBuscaPorCoordenadas.Symbol = RecursosGraficos.RecursosGraficos.ObtemImagem(RecursosGraficos.RecursosGraficos.Imagens.MarcadorCustomizadoFerramentaCoordenadas);
GraphicsLayer resultadoBuscaCoordenada = mapaEmExecucao.Layers["ExibePontosFerramentaCoordenadas"] as GraphicsLayer;
resultadoBuscaCoordenada.Graphics.Add(bandeiraBuscaPorCoordenadas);
}