It looks like a bug in System.Windows.DataTemplate, but I thought I'd ask here if you know a way around this bug:
Assigning a ToolTipTemplate to an InformationLater requires that you pass it a DataTemplate (of course - for binding), but the DataTemplate tip does not support CornerRadius (it seems broken).
However, if I omit ToolTipTemplate and use ToolTipservice to specify this and call a ControlTemplate for the tip, CornerRadius works fine!
Any idea why this is or how to work around it easily?
Thanks!
Assigning a ToolTipTemplate to an InformationLater requires that you pass it a DataTemplate (of course - for binding), but the DataTemplate tip does not support CornerRadius (it seems broken).
<DataTemplate x:Key="CustomToolTipDataTemplate"> <Border BorderBrush="Black" BorderThickness="2" CornerRadius="6" Background="#FDF2D4" MaxWidth="300"> <Grid Margin="2"> <Grid.RowDefinitions> <RowDefinition Height="14" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='NAME', StringFormat=County: {0}}" /> <TextBlock Grid.Row="1" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="10" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='PAT_EST', StringFormat='Paternity Establishment Percentage: {0:0.##}'}" /> <TextBlock Grid.Row="2" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases with Orders: 87" /> <TextBlock Grid.Row="3" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Current Collected: 91" /> <TextBlock Grid.Row="4" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases Paying Arrears: 84" /> <TextBlock Grid.Row="5" FontFamily="Trebuchet MS" FontSize="10" Text="Medical Support Ratio: 74" /> <TextBlock Grid.Row="6" FontFamily="Trebuchet MS" FontSize="10" Text="Cost Effectiveness Ratio: 96" /> </Grid> </Border></DataTemplate>However, if I omit ToolTipTemplate and use ToolTipservice to specify this and call a ControlTemplate for the tip, CornerRadius works fine!
<ToolTipService.ToolTip> <ToolTip Template="{StaticResource ToolTipTemplateXX}" HasDropShadow="True"> <ToolTip.Content> <TextBlock Text="This is a test" FontFamily="Georgia" FontSize="14" TextWrapping="Wrap"/> </ToolTip.Content> </ToolTip></ToolTipService.ToolTip><ControlTemplate x:Key="ToolTipTemplateXX"> <Border BorderBrush="Black" BorderThickness="2" CornerRadius="6" Background="#FDF2D4" MaxWidth="300"> <Grid Margin="2"> <Grid.RowDefinitions> <RowDefinition Height="14" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> <RowDefinition Height="12" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="County: Centre" /> <TextBlock Grid.Row="1" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="10" Text="Paternity Establishment Percentage: 98" /> <TextBlock Grid.Row="2" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases with Orders: 87" /> <TextBlock Grid.Row="3" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Current Collected: 91" /> <TextBlock Grid.Row="4" FontFamily="Trebuchet MS" FontSize="10" Text="Percent of Cases Paying Arrears: 84" /> <TextBlock Grid.Row="5" FontFamily="Trebuchet MS" FontSize="10" Text="Medical Support Ratio: 74" /> <TextBlock Grid.Row="6" FontFamily="Trebuchet MS" FontSize="10" Text="Cost Effectiveness Ratio: 96" /> </Grid> </Border></ControlTemplate>Any idea why this is or how to work around it easily?
Thanks!