This is a migrated thread and some comments may be shown as answers.

The property 'x' was not found in type 'y'

6 Answers 108 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 11 Jul 2013, 07:40 PM
I'm seeing a nonsensical type of runtime error from the RadCartesianChart, which seems to have been triggered by our upgrading from the Q1 2013 to Q2 2013 Telerik DLLs.

The specific error is a "XamlParseException", which occurs on "InitializeComponent" in my User Control:

    The property 'ValueBinding' was not found in type 'LineSeries'. [Line: 101 Position: 80]

Now, obviously the property does exist, and actually both Visual Studio intellisense recognizes the property, and I can see it in the metadata definition for "CategoricalSeries".

The problem does not appear to be specific to this property, as I can get the same error for "LineSeries.LegendSettings".

This is part of the offending XAML:

<telerik:LineSeries
    ItemsSource="{Binding Data}"
    ValueBinding="Val"
    CategoryBinding="Date"
    />


6 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 12 Jul 2013, 05:15 AM
Hi Nathan,

 Unfortunately we've been unable to reproduce this issue locally. Could you, please, open a support ticket and send us a sample test application that we could use to recreate this exception on our side, so that we could have a look at the code, debug it and find the root of the problem.

Regards,
Nikolay
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Nathan
Top achievements
Rank 1
answered on 12 Jul 2013, 06:17 PM
Resolved -- it turned out to be a simple, if strange, fix.

First, some background.  My project makes use of the "RadChart" control, and wanted to add some new charts that use the new "RadChartView".  These being incompatible, I added a new Silverlight class library project that references the new "Telerik.Windows.Data.Chart", while the main project still referenced "Telerik.Windows.Data.Charting".  The library defined some user controls containing RadChartViews, and the main project inserted the user controls.

For some reason, upgrading to the Q2 2013 DLLs triggered the errors mentioned in the OP.  To fix it, it turns out all I needed to do was add a reference to the "Telerik.Windows.Data.Chart" DLL in the main project.
0
Jan
Top achievements
Rank 1
answered on 22 Jan 2014, 04:35 PM
I am also having a similar issue. Can someone from Telerik please comment on this thread? I do NOT see a DLL named Telerik.Windows.Data.Chart.dll. I do see Telerik.Windows.Controls.Chart and .Charting. I am referencing both of them but am still getting the same exception as the original poster.

Thank you!
0
Petar Marchev
Telerik team
answered on 24 Jan 2014, 09:06 AM
Hi Nelson,

The reason for this error is very simple. You have referenced both the Chart and Charting assemblies. There a class named LineSeries in the Chart assembly, and there is a different class with the same name LineSeries in the Charting assembly. Now, both of these classes are mapped to the Telerik schema, so when you type <telerik:LineSeries /> the XAML parser does not know which of the two you mean. Thus an error occurs. Here the schema is defined like this:
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

The fix is also very simple. Instead of using the schema, you can use the desired namespace:
xmlns:telerikChartView="clr-namespace:Telerik.Windows.Controls.ChartView"
<telerikChartView:LineSeries />

The LineSeries is not the only class that the parse will have problems with. Other classes are also Axis, ScatterDataPoint (DataVis dll) and perhaps others.

Note that we always suggest that you do not use the old RadChart at all and totally remove the Charting reference from your project.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Jan
Top achievements
Rank 1
answered on 27 Jan 2014, 05:30 PM
Thank you. I will try these suggestions.

However, if you notice, I was replying to the other person's suggestion that seems very contradictory, especially with other posts on this forum. He says in one sentence "the main project still referenced "Telerik.Windows.Data.Charting" and then later he says he fixed it with by "add(ing) a reference to the "Telerik.Windows.Data.Chart" DLL in the main project". 

This would mean that both Chart and Charting are referenced in the same project and I have seen Telerik recommend against this as it causes issues.

Is that right? Will referencing both Chart and Charting in the same project cause issues?
0
Petar Marchev
Telerik team
answered on 28 Jan 2014, 09:21 AM
Hi Nelson,

I think that Nathan found an interesting solution for his application. Nathan created his own library MyChartView.dll and used his MyCartesianChart wrapper classes, that somehow wrap the RadCartesianChart. Details are not that important I think.

Yes, we do not recommend using both assemblies in the same project because the new control is more powerful than the old one, and there is no need to use the old RadChart, and because the XAML parser may get confused (as earlier described in this thread).

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Chart
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Nathan
Top achievements
Rank 1
Jan
Top achievements
Rank 1
Petar Marchev
Telerik team
Share this question
or