was this ever resolved? I created a class inheriting the MapTip so that i can customize it but it doesnt show when i hover over the graphic, im pretty sure it has something to do with making a custom class of the map tip.
Imports System
Imports System.Net
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Documents
Imports System.Windows.Ink
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Shapes
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows.Data
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Controls.Primitives
Imports ESRI.ArcGIS.Client.Toolkit
Namespace UserControls
' <summary>
' </summary>
<TemplateVisualState(Name:="Collapsed", GroupName:="ViewStates"), _
TemplateVisualState(Name:="Expand", GroupName:="ViewStates"), _
TemplatePart(Name:="MaptTipImage", Type:=typeof(Image))>
Public Class ExtendedMapTip
Inherits MapTip
' <summary>
' </summary>
#Region "Private fields"
Private MaptTipImage As Image
#End Region
Public Sub New()
DefaultStyleKey = GetType(ExtendedMapTip)
End Sub
#Region "Dependency Properties"
' <summary>
' Gets or sets a value indicating whether this control is expanded.
' </summary>
' <value>
' <c>true</c> if this instance is expanded; otherwise, <c>false</c>.
' </value>
#End Region
' <summary>
' </summary>
Public Overrides Sub OnApplyTemplate()
MyBase.OnApplyTemplate()
MaptTipImage = TryCast(Me.GetTemplateChild("MaptTipImage"), Image)
If MaptTipImage IsNot Nothing Then
AddHandler MaptTipImage.MouseLeftButtonUp, AddressOf Image_Click
End If
End Sub
Public Sub Image_Click(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonUp
Try
Dim MapTipImage As Image = TryCast(sender, Image)
If MapTipImage Is DBNull.Value Then
Return
End If
Dim Maptip As Grid = TryCast(MapTipImage.Parent, Grid)
Me.HorizontalAlignment = HorizontalAlignment.Stretch
Me.VerticalAlignment = VerticalAlignment.Stretch
Catch generatedExceptionName As System.Exception
End Try
End Sub
End Class
End Namespace
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
xmlns:local="clr-namespace:MatrixWebMap.UserControls"
xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
xmlns:converters="clr-namespace:MatrixWebMap.Converter"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
xmlns:esriToolkit="clr-namespace:ESRI.ArcGIS.Client.Toolkit;assembly=ESRI.ArcGIS.Client.Toolkit"
>
<!-- Map Tip Style -->
<Style x:Key="MapTipSkin" TargetType="esri:MapTip">
<Setter Property="Background" Value="#000000"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
<Setter Property="Height" Value="Auto" />
<Setter Property="Opacity" Value="1"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="BorderBrush" Value="#FFFFFF"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="esri:MapTip">
<Grid x:Name="MapTipContents" MinWidth="50" Background="Black" Opacity="1" Width="Auto" Height="Auto">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Collapsed">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MapTipData" Storyboard.TargetProperty="Height">
<SplineDoubleKeyFrame KeySpline="0.3,0 0,1" KeyTime="00:00:00.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MapTipData" Storyboard.TargetProperty="Width">
<SplineDoubleKeyFrame KeySpline="0.3,0 0,1" KeyTime="00:00:00.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Expanded">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MapTipData" Storyboard.TargetProperty="Height">
<SplineDoubleKeyFrame KeySpline="0.3,0 0,1" KeyTime="00:00:00.5" Value="240"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MapTipData" Storyboard.TargetProperty="Width">
<SplineDoubleKeyFrame KeySpline="0.3,0 0,1" KeyTime="00:00:00.5" Value="360"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="MapTip" MinWidth="50" Background="Black" Opacity="0.8" Width="Auto" Height="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.RowSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5"/>
<Polyline Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Points="0,10 -10,-10 10,0"/>
<ContentPresenter Margin="5,5,5,0" Content="{TemplateBinding Title}"/>
<data:DataGrid x:Name="MapTipData" Height="0" Margin="5,5,5,5" Width="0" Grid.Column="0" Grid.Row="12" Foreground="White" RowBackground="#555555" AlternatingRowBackground="Black" AutoGenerateColumns="True" HeadersVisibility="None" ItemsSource="{TemplateBinding ItemsSource}" RowStyle="{StaticResource DataGridRowStyle}" />
</Grid>
<Image x:Name="MapTipImage" Source="{Binding [FileLink]}" Margin="5,5,5,5" HorizontalAlignment="Center" Opacity="1" VerticalAlignment="Bottom" Width="Auto" Height="Auto" MaxHeight="{Binding ElementName=MapTipData, Path=Height}" MaxWidth="{Binding ElementName=MapTipData, Path=Width}" >
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MapTipContents" Storyboard.TargetProperty="Height" To="600"/>
<DoubleAnimation Storyboard.TargetName="MapTipContents" Storyboard.TargetProperty="Width" To="800"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>