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

Binding to readonly property

1 Answer 233 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 03 Aug 2012, 03:17 AM
Hello,

In keeping with the mvvm style, I have been trying populate the timebar intervals via binding.  However, it complains at me when I try(see below) because Intervals is readonly.  I noticed the interval groups and interval items properties, but I'm not sure what they do.  Is there a way to populate the intervals (and acess other read-only properties such as ActualMinZoomRange) without resorting to giving the RadTimeBar and "x:Name="?

Thanks,
Eric
<telerik:RadTimeBar DataContext="{Binding}" Intervals="{Binding Intervals, Mode=OneWayToSource}"/>

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 07 Aug 2012, 01:45 PM
Hi Eric,

You cannot bind the Intervals or the ActualMinZoomRange properties of RadTimeBar, as you expect. You can, for example, use bindings with ElementName on your view model.

All the best,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TimeBar
Asked by
Eric
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or