Here is the code that I used to get it to work.Chris
private void TextBlock_MouseEnter(object sender, MouseEventArgs e)
{
QueryResultData HiLight = (QueryResultData)(sender as FrameworkElement).DataContext;
Graphic g = getGraphic(HiLight);
g.Symbol = SearchSelectedSymbol;
if (g != null)
{
g.Select();
g.SetZIndex(1);
}
}
private void TextBlock_MouseLeave(object sender, MouseEventArgs e)
{
QueryResultData HiLight = (QueryResultData)(sender as FrameworkElement).DataContext;
Graphic g = getGraphic(HiLight);
g.Symbol = SearchPictureSymbol;
if (g != null)
{
g.Select();
g.SetZIndex(0);
}
}
private Graphic getGraphic(QueryResultData HiLight)
{
GraphicsLayer layer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (HiLight != null && layer != null)
{
foreach (Graphic g in layer.Graphics)
{
if (g.Geometry == HiLight.SHAPE)
{
return g;
}
}
}
return null;
}