Hi,I have graphic layer and loading graphics on it using query task. I also have a map tip to display the attribute data in the map tip. Graphic layer is being created programmatically and also creating map tip programmatically. I have written the following code on the query task complete event.var gl = (GraphicsLayer)MainMap.Layers["MyGraphicLayer"];
var features = args.FeatureSet.Features;
gl.Graphics.Clear();
foreach (var graphic in features)
{
graphic.Symbol = (Symbol)Application.Current.Resources["MySymbol"];
graphic.MapTip = new MyMapTip(graphic);
GraphicsLayer.SetMapTipHideDelay(graphic.MapTip, new TimeSpan(0, 0, 0, 0, 500));
gl.Graphics.Add(graphic);
}
This is the constructor of my MyMapTip user controlpublic MyMapTip(Graphic graphic)
{
InitializeComponent();
DataContext = graphic.Attributes;
}
This is the xaml of the user control ,where I define the binding and display an attribute value.<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center"
FontSize="10"
FontWeight="Bold"
Foreground="Black"
Text="Nombre: " />
<TextBlock HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="10"
Foreground="Black"
Text="{Binding [NOMBRE]}" />
</StackPanel>
Now when I mouse over the graphic, map tip appears but i never disappear after 0.5 sec. It stays there unless I pan/zoom or mouse over to other graphics on the map.Any one can suggest, what I am making mistake?