Hello,
I have a problem with tooltip on my lineserie. I am creating my lineseries in code behind. So with the code below I am trying to create a lineserie and a tooltip for that. But when I came over to my lineserie with the mouse It throws "Can not create top-level child window" error. Could you help about this problem
Thanks
//Create Lineseri LineSeries lineSeri = new LineSeries(); lineSeri.ItemsSource = each.DefaultView; lineSeri.ValueMemberPath = _vm.ChartYAxisValueMemberPath; lineSeri.XAxis = xAxis; lineSeri.YAxis = yAxis; lineSeri.TrendLineZIndex = 1; lineSeri.Title = "TestTitle"; //Create Tooltip StackPanel spMain = new StackPanel(); TextBlock txtBlock1 = new TextBlock(); txtBlock1.Text = "TestText: "; spMain.Children.Add(txtBlock1); lineSeri.ToolTip = spMain; xamDataChart1.Series.Add(lineSeri);
//Create Lineseri
LineSeries lineSeri = new LineSeries();
lineSeri.ItemsSource = each.DefaultView;
lineSeri.ValueMemberPath = _vm.ChartYAxisValueMemberPath;
lineSeri.XAxis = xAxis;
lineSeri.YAxis = yAxis;
lineSeri.TrendLineZIndex = 1;
lineSeri.Title = "TestTitle";
//Create Tooltip
StackPanel spMain = new StackPanel();
TextBlock txtBlock1 = new TextBlock();
txtBlock1.Text = "TestText: ";
spMain.Children.Add(txtBlock1);
lineSeri.ToolTip = spMain;
xamDataChart1.Series.Add(lineSeri);
<baseControl:GraphsBaseUserControl x:Class="SPKPlugin.PresentationLayer.HisseDashboard" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" xmlns:igEditors="http://infragistics.com/Editors" xmlns:igDP="http://infragistics.com/DataPresenter" xmlns:Utils="clr-namespace:SPKPlugin.PresentationLayer.Utils" xmlns:baseControl="clr-namespace:SPKPlugin.PresentationLayer" xmlns:controls ="clr-namespace:SPKGozetim.Common.PresentationLayer.Controls;assembly=SPKGozetim.Common" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <baseControl:GraphsBaseUserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/SPKGozetim.Common;component/PresentationLayer/Controls/OptionsPanel.xaml"/> <ResourceDictionary Source="pack://application:,,,/SPKPlugin;component/PresentationLayer/StyleTest.xaml"/> </ResourceDictionary.MergedDictionaries> <ig:StringFormatConverter x:Key="AxisRangeValueConverter" /> <ItemsPanelTemplate x:Key="ListBoxItemsPanelTemplateH"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" /> </ItemsPanelTemplate> <Utils:IsNullConverter x:Key="IsNullConverter"></Utils:IsNullConverter> <Utils:HisseEkleMultiValueConverter x:Key="MultiValueConverter"></Utils:HisseEkleMultiValueConverter> </ResourceDictionary> </baseControl:GraphsBaseUserControl.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <ig:XamDataChart Name="xamDataChart1" HorizontalZoomable="True" Grid.Row="0" HorizontalZoombarVisibility="Visible" VerticalZoomable="False" Margin="0,0,0,0" Legend="{Binding ElementName=xmLegend}"> <ig:SyncManager.SyncSettings> <ig:SyncSettings SyncChannel="Group1" SynchronizeHorizontally="True" SynchronizeVertically="False" /> </ig:SyncManager.SyncSettings> <ig:XamDataChart.Axes> <ig:CategoryDateTimeXAxis x:Name="xAxis" DateTimeMemberPath="TARIH" Gap="2" Interval="{Binding ElementName=sldYAxisInterval, Path=Value, Converter={StaticResource AxisRangeValueConverter}, ConverterParameter='0'}"> <ig:CategoryDateTimeXAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideBottom" Extent="40" Angle="270" /> </ig:CategoryDateTimeXAxis.LabelSettings> <ig:CategoryDateTimeXAxis.Label> <DataTemplate> <TextBlock Text="{Binding Item.Date, StringFormat={}{0:dd.MM} }" Margin="-25,0,0,0" FontSize="10" /> </DataTemplate> </ig:CategoryDateTimeXAxis.Label> <ig:CategoryDateTimeXAxis.Style> <Style TargetType="ig:Axis"> <Setter Property="MajorStrokeThickness" Value="0"/> </Style> </ig:CategoryDateTimeXAxis.Style> </ig:CategoryDateTimeXAxis> <ig:NumericYAxis x:Name="yAxis" Label="{}{0:P}"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="InsideLeft" /> </ig:NumericYAxis.LabelSettings> <ig:NumericYAxis.Style> <Style TargetType="ig:Axis"> <Setter Property="MajorStrokeThickness" Value="0"/> </Style> </ig:NumericYAxis.Style> </ig:NumericYAxis> <ig:NumericYAxis x:Name="yAxisVol" Label="{}{0:N0}"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="InsideRight" /> </ig:NumericYAxis.LabelSettings> <ig:NumericYAxis.Style> <Style TargetType="ig:Axis"> <Setter Property="MajorStrokeThickness" Value="0"/> </Style> </ig:NumericYAxis.Style> </ig:NumericYAxis> </ig:XamDataChart.Axes> </ig:XamDataChart> </Grid> </baseControl:GraphsBaseUserControl>
<baseControl:GraphsBaseUserControl x:Class="SPKPlugin.PresentationLayer.HisseDashboard"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ig="http://schemas.infragistics.com/xaml"
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
xmlns:igEditors="http://infragistics.com/Editors"
xmlns:igDP="http://infragistics.com/DataPresenter"
xmlns:Utils="clr-namespace:SPKPlugin.PresentationLayer.Utils"
xmlns:baseControl="clr-namespace:SPKPlugin.PresentationLayer"
xmlns:controls ="clr-namespace:SPKGozetim.Common.PresentationLayer.Controls;assembly=SPKGozetim.Common"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<baseControl:GraphsBaseUserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/SPKGozetim.Common;component/PresentationLayer/Controls/OptionsPanel.xaml"/>
<ResourceDictionary Source="pack://application:,,,/SPKPlugin;component/PresentationLayer/StyleTest.xaml"/>
</ResourceDictionary.MergedDictionaries>
<ig:StringFormatConverter x:Key="AxisRangeValueConverter" />
<ItemsPanelTemplate x:Key="ListBoxItemsPanelTemplateH">
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" />
</ItemsPanelTemplate>
<Utils:IsNullConverter x:Key="IsNullConverter"></Utils:IsNullConverter>
<Utils:HisseEkleMultiValueConverter x:Key="MultiValueConverter"></Utils:HisseEkleMultiValueConverter>
</ResourceDictionary>
</baseControl:GraphsBaseUserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ig:XamDataChart Name="xamDataChart1"
HorizontalZoomable="True" Grid.Row="0"
HorizontalZoombarVisibility="Visible"
VerticalZoomable="False"
Margin="0,0,0,0"
Legend="{Binding ElementName=xmLegend}">
<ig:SyncManager.SyncSettings>
<ig:SyncSettings SyncChannel="Group1"
SynchronizeHorizontally="True"
SynchronizeVertically="False" />
</ig:SyncManager.SyncSettings>
<ig:XamDataChart.Axes>
<ig:CategoryDateTimeXAxis x:Name="xAxis"
DateTimeMemberPath="TARIH" Gap="2"
Interval="{Binding ElementName=sldYAxisInterval, Path=Value, Converter={StaticResource AxisRangeValueConverter}, ConverterParameter='0'}">
<ig:CategoryDateTimeXAxis.LabelSettings>
<ig:AxisLabelSettings Location="OutsideBottom" Extent="40" Angle="270" />
</ig:CategoryDateTimeXAxis.LabelSettings>
<ig:CategoryDateTimeXAxis.Label>
<DataTemplate>
<TextBlock Text="{Binding Item.Date, StringFormat={}{0:dd.MM} }" Margin="-25,0,0,0" FontSize="10" />
</DataTemplate>
</ig:CategoryDateTimeXAxis.Label>
<ig:CategoryDateTimeXAxis.Style>
<Style TargetType="ig:Axis">
<Setter Property="MajorStrokeThickness" Value="0"/>
</Style>
</ig:CategoryDateTimeXAxis.Style>
</ig:CategoryDateTimeXAxis>
<ig:NumericYAxis x:Name="yAxis" Label="{}{0:P}">
<ig:NumericYAxis.LabelSettings>
<ig:AxisLabelSettings Location="InsideLeft" />
</ig:NumericYAxis.LabelSettings>
<ig:NumericYAxis.Style>
</ig:NumericYAxis.Style>
</ig:NumericYAxis>
<ig:NumericYAxis x:Name="yAxisVol" Label="{}{0:N0}">
<ig:AxisLabelSettings Location="InsideRight" />
</ig:XamDataChart.Axes>
</ig:XamDataChart>
</Grid>
</baseControl:GraphsBaseUserControl>
Thank you for your reply. I have further reseach the issue that you have described and I am still not able to reproduce it. I have created a new WPF Browser Application, following the scenario that you have described in your reply and no exception is thrown when hover the series to show the tool tip. I have tested the sample with the latest service release of 11.1 version and also with the build that you are have mentioned, with the same result. I am attaching the sample application.
Would you please, if possible, modify the sample applciatio that I have attached, in order to demonstrates the issue, so I will be able to research the reason for it more accurately?
Looking forward to hearing from you.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Just to try I created my lineseries not in code behind and created in xaml. But nothing changed im my application.
I forgot to say I am using XBAP application and below you can see the exception;
I downloaded your sample project and It worked properly.
I modified it with my sql query that returns to datatable and It also worked properly.
In my own application I am adding my window to the content method of a ContentPane and then I add this contentpane on a TabGroupPane. Maybe things get crazy on that but I am not sure. What should I try?
I am using windows 7 32 bit, net advantage product and my version is 11.1.20111.2173.
Thank you for your post. I have changed the source of the sample application to DataTable and also to use version 11.1 and it seems that there is an issue when using DataTable as data source, which results in series to not get rendered. This issue is reproducible only in the RTM version of 11.1 (11.1.20111.1002) and it is fixed in the latest service release for version 11.1. I can suggest downloading the latest service release for version 11.1 and testing you application with that build. I am attaching the modified sample application, which uses 11.1 version.
Please let me know if you can reproduce the issue with my sample application using the latest service release for version 11.1 (11.1.20111.2282). Also, would you please provide me with more detailed information regarding the environment in which you are developing you application (Operating system, Service Release, Integrated development environment and the specific version of our product that you are using)?