I would like to add a tooltip to a bullet charts measures so I have modified the template to include a tooltip, however I get an error when registering the resource. This seems to be caused by the bindings, any idea why this is occurring?
<Style x:Key="FeaturedMeasureStyle" TargetType="igGuage:FeaturedMeasure"> <Setter Property="Value" Value="{Binding Path=DblValue}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igGuage:FeaturedMeasure"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Stroke}" BorderThickness="{TemplateBinding BorderThickness}">
<ToolTipService.ToolTip> <Border BorderBrush="{StaticResource WidgetSubtleForegroundBrush}" Background="White" Margin="-10" BorderThickness="1.0" CornerRadius="5" > <Border.Effect> <DropShadowEffect BlurRadius="5" Color="Black" Opacity="0.5" /> </Border.Effect> <Grid Margin="5" > <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition /> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding Caption}" Grid.Row="0" Margin="2,2,5,2" /> <TextBlock Text="{Binding FormattedValue}" Grid.Row="1" Margin="2" FontWeight="Bold" /> </Grid> </Border> </ToolTipService.ToolTip> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
Have found that the issue was caused by binding the value, the tooltip doesnt have the issue so must be something internal to the control.
You can set tooltip with:
<ig:XamBulletGraph>
<ig:XamBulletGraph.FeaturedMeasures>
<ig:FeaturedMeasure Value="50" ToolTipService.ToolTip="Tooltip" />
</ig:XamBulletGraph.FeaturedMeasures>
</ig:XamBulletGraph>