I am building an application that will have an unknown number of tabs. Inside each tab is a chart with two data sets. I can get the dynamically created tabs working. I can also get the chart working outside of the tab control, but when I combine them, the chart area just says No Data points. It should be noted that I am following the MVVM pattern, so there is no code behind for the view. Everything is done with databinding in the xaml. The data to which I am binding is an observable collection with an observable collection inside it. Here is the view xaml.
<
Grid
>
<
TabControl
ItemsSource
=
"{Binding TotalGradeProfile}"
>
<
TabControl.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
DataTemplate
>
</
TabControl.ItemTemplate
>
<
TabControl.ContentTemplate
>
<
DataTemplate
>
<
telerik:RadCartesianChart
x:Name
=
"chart"
Palette
=
"Summer"
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:LinearAxis
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
HorizontalAlignment
=
"Right"
></
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.SeriesProvider
>
<
telerik:ChartSeriesProvider
Source
=
"{Binding GradeProfiles}"
>
<
telerik:ChartSeriesProvider.SeriesDescriptors
>
<
telerik:ScatterSeriesDescriptor
XValuePath
=
"Mp"
YValuePath
=
"RegionGrade"
>
<
telerik:ScatterSeriesDescriptor.Style
>
<
Style
TargetType
=
"telerik:ScatterLineSeries"
>
<
Setter
Property
=
"StrokeThickness"
Value
=
"2"
/>
</
Style
>
</
telerik:ScatterSeriesDescriptor.Style
>
</
telerik:ScatterSeriesDescriptor
>
</
telerik:ChartSeriesProvider.SeriesDescriptors
>
</
telerik:ChartSeriesProvider
>
</
telerik:RadCartesianChart.SeriesProvider
>
</
telerik:RadCartesianChart
>
</
DataTemplate
>
</
TabControl.ContentTemplate
>
</
TabControl
>
</
Grid
>