At first glance, I don't see why the control doesn't work after changing its name.
Check that you changed the name in xaml as well and that your NewMapTip.theme.xmal is included in the resources of the file 'Themes/generic.xaml'.
That being said, developping a new control is not the recommended approach. You could just change the template of the existing control (easy with the UI of Blend or with VS, you can copy the maptip style from MapTip.theme.xaml and modify it in your project.
Thanks!!!Ok that didn't work. I included the name in the 'Themes/generic.xaml'.However, as you suggested going by editing the style. How to do it If i have to add these controls to the existing style 1. The map tip displays a title which you bind to a specific graphics attribute (using TitleMember). I want to use my own title in other words not use map tips title but I want to create a new label that displays the title of the map tip.2. One more datagrid in addition to the grid that shows graphic attributes and how do i set the new data grids itemsource. I have a dependency property defined in my viewmodel that I want to bind to the new grid's itemsource.3. A button and I have a class that implements ICommand. How do I attach the button click event trigger to my ICommand class. <Style TargetType="local:MapTip">
<Setter Property="HorizontalOffset" Value="20" />
<Setter Property="VerticalOffset" Value="30" />
<Setter Property="Background" Value="White" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#FF666666" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:MapTip">
<Grid x:Name="MapTip" MinWidth="50" >
<VisualStateManager.VisualStateGroups>
</VisualStateManager.VisualStateGroups>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.RowSpan="2" />
<Polyline Points="0,10 -10,-10 10,0" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Fill="{TemplateBinding Background}" />
<ContentPresenter Margin="5,5,5,0" Content="{TemplateBinding Title}" />
<Stackpanel Orientation="Horizontal" Grid.Row="1">
<data:DataGrid HeadersVisibility="None"
ItemsSource="{TemplateBinding ItemsSource}"
x:Name="MapTipData"
Margin="5,5,5,5"
AlternatingRowBackground="White"
Height="0"
Width="0"
AutoGenerateColumns="True" />
<data:DataGrid x:Name="NewDataGrid" HeadersVisibility="None"
AutoGenerateColumns="True" />
</Stackpanel>
<Button x:name="btnGetImage"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>