Errors with Chart : BindingExpression path error: 'ActualDataPointStyle' and 'ActualLegendItemStyle'

Oct 9, 2013 at 1:09 PM
I'm testing the chart control, but when i run my app, it crashed.

Errors :
Error: BindingExpression path error: 'ActualDataPointStyle' property not found on 'WinRTXamlToolkit.Controls.DataVisualization.Charting.ColumnSeries, WinRTXamlToolkit.Controls.DataVisualization, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null'. BindingExpression: Path='ActualDataPointStyle' DataItem='WinRTXamlToolkit.Controls.DataVisualization.Charting.ColumnSeries, WinRTXamlToolkit.Controls.DataVisualization, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null'; target element is 'WinRTXamlToolkit.Controls.DataVisualization.Charting.ColumnDataPoint' (Name='null'); target property is 'Style' (type 'Style')

Error: BindingExpression path error: 'ActualLegendItemStyle' property not found on 'WinRTXamlToolkit.Controls.DataVisualization.Charting.ColumnSeries, WinRTXamlToolkit.Controls.DataVisualization, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null'. BindingExpression: Path='ActualLegendItemStyle' DataItem='WinRTXamlToolkit.Controls.DataVisualization.Charting.ColumnSeries, WinRTXamlToolkit.Controls.DataVisualization, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null'; target element is 'WinRTXamlToolkit.Controls.DataVisualization.Charting.LegendItem' (Name='null'); target property is 'Style' (type 'Style')

This is code I use : (very simple)

MainPage.xaml:
<Page
    x:Class="TestWinStoreApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:TestWinStoreApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:chart="using:WinRTXamlToolkit.Controls.DataVisualization.Charting"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <chart:Chart x:Name="chart" Title="Test" Background="LightBlue" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10"/>
    </Grid>
</Page>
MainPage.xaml.cs:
using ....


namespace TestWinStoreApp
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MyClassCollection coll = new MyClassCollection();

        public MainPage()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            for (Int32 c = 0; c < 32; c++)
            {
                MyClass newClass = new MyClass(c.ToString(), c);
                coll.Add(newClass);
            }

            ColumnSeries series = new ColumnSeries()
            {
                IndependentValueBinding = new Binding() { Path = new PropertyPath("XAxis") },
                DependentValueBinding = new Binding() { Path = new PropertyPath("YAxis") },
                ItemsSource = coll,
            };

            chart.Series.Add(series);
        }
    }

    public class MyClass
    {
        public String XAxis { get; set; }
        public Double YAxis { get; set; }

        public MyClass(String X, Double Y)
        {
            XAxis = X;
            YAxis = Y;
        }
    }

    public class MyClassCollection : ObservableCollection<MyClass>
    {
        public MyClassCollection()
        {
        }
    }
}
Any help will be appreciated.

Thanks