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.
<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>
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.