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

Binding Error

2 Answers 54 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 11 May 2011, 03:05 AM
When adding the following TimeBar to my app,  I get Binding errors when scrolling through the data.  I have removed the sparkline within the TimeBar and I still get the binding errors.

<telerik:RadTimeBar PeriodStart="1-Jan-2010 12:00:00 AM" PeriodEnd="31-Dec-2011 11:59:59 PM"
                     
VisiblePeriodStart="11-Nov-2010 12:00:00 AM" VisiblePeriodEnd="14-March-2011 11:59:59 PM"
                     
SelectionStart="1-Jan-2011 12:00:00 AM" SelectionEnd="28-Feb-2011 11:59:59 PM">
       
<telerik:RadTimeBar.Intervals>
           
<telerik:YearInterval />
           
<telerik:MonthInterval />
           
<telerik:WeekInterval />
           
<telerik:DayInterval />
       
</telerik:RadTimeBar.Intervals>
       <!--
<telerik:RadLinearSparkline ItemsSource="{Binding LinearData}" XValuePath="Date" YValuePath="Value" />-->
   
</telerik:RadTimeBar>

Here is what I get in the output window:

System.Windows.Data Error: BindingExpression path error: 'Label' property not found on 'MyApp.ViewModels.DashboardPaneViewModel' 'MyApp.ViewModels.DashboardPaneViewModel' (HashCode=53251301). BindingExpression: Path='Label' DataItem='MyApp.ViewModels.DashboardPaneViewModel' (HashCode=53251301); target element is 'System.Windows.Controls.TextBlock' (Name=''); target property is 'Text' (type 'System.String')..

As you can see, the XAML is cut and past from your online documentation found here

Can you tell me what is causing the binding to fail when I have nothing bound to this control?

Thanks,

2 Answers, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 1
answered on 11 May 2011, 03:30 AM
It truns out this binding error is coming when I set my ViewModel in the RadPane or Grid holding the TimeBar control.  The TimeBar is constantly looking for a Label property for some reason.  To get rid of the error, I added a automatic property called Label to my ViewModel, but I would like know if I am doing something wrong, or if this is a bug.

Thanks,

-Scott
0
Yavor
Telerik team
answered on 13 May 2011, 09:42 AM
Hello Scott,

RadTimeBar uses container recycling for its group and item label containers. This issue appears in Silverlight for some reason when recycling the containers. Our developers are working on this issue and will fix it for one of the next releases. Unfortunately due to the source of the problem I cannot suggest a proper workaround except for the one you come up with.

Best wishes,
Yavor Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TimeBar
Asked by
Scott
Top achievements
Rank 1
Answers by
Scott
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or