How can I hookup a custom tooltip (like the FinancialPriceSeries tooltip in the sample ChartTooltips.xaml) for a dynamically or programmatically created scatter series? I tried the following but it errors out:
Dim xmMessageSeries As New ScatterSeries()xmMessageSeries.XMemberPath = "XxmMessageSeries.YMemberPath = "Y"xmMessageSeries.ItemsSource = MyDataDim objTooltip As New ToolTipobjTooltip.ContentTemplate = CType(FindResource("MyToolTipTemplate"), DataTemplate)xmMessageSeries.ToolTip = objTooltip
I made my custom tooltip in xaml as a DataTemplate, but it errors when I hover over it with the error "ToolTip cannot have a logical or visual parent".
Any suggestions on the right way to do this?
In case anyone wants to know what my tooltip DataTemplate looks like here it is:
<DataTemplate x:Key="MyToolTipTemplate">
<StackPanel Orientation="Vertical">
<TextBlock Text="My Tool Tip" FontWeight="Bold"/>
</StackPanel>
</DataTemplate>
Hello,
I have been looking into your requirement and can suggest you look through this link from our online documentation that describes how you can create a ToolTip of your own: http://help.infragistics.com/NetAdvantage/WPFDV/2011.1/CLR4.0/?page=xamDataChart_Chart_Tooltips.html . And in your case you can set the series ToolTip property like so:
<ig:LineSeries ValueMemberPath="Value"
ItemsSource="{Binding}"
XAxis="{Binding ElementName=xmXAxis}"
YAxis="{Binding ElementName=xmYAxis}">
<ig:LineSeries.ToolTip>
</ig:LineSeries.ToolTip>
</ig:LineSeries>
Please let me know if I can assist you further on the matter.