What's the easiest way to set tooltip for nodes programatically?
Thanks
Hi,
This simple Works but how can I remove the tooltip if the text is empty?
regards,
alex
Hello,
Do you have a sample illustrating your issue? I tested this and it the behavior is is expected.
Please see attached sample.
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
I am having an issue with this. I am using the suggested xaml, but the tooltip appears on the grid displaying the first node's data, not on the nodes and it doesn't change location or data when I move from node to node.
Did you resolve your issue?
Valerie
Another approach is to edit the default template of the nodes and add the tooltip through XAML code:
<Style TargetType="ig:TreemapNode"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType=" ig:TreemapNode"> <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Fill}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}"> <!--######################--> <ToolTipService.ToolTip> <ToolTip DataContext="{TemplateBinding DataContext}"> <Grid> <!--Content--> </Grid> </ToolTip> </ToolTipService.ToolTip> <!--######################--> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock Text="{TemplateBinding Text}" HorizontalAlignment="Center" /> <ig:NodesPanel x:Name="NodesPanel" Grid.Row="1" /> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>