Binding to readonly property

2 posts, 0 answers
  1. Eric
    Eric avatar
    48 posts
    Member since:
    Jul 2012

    Posted 02 Aug 2012 Link to this post


    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="?

    <telerik:RadTimeBar DataContext="{Binding}" Intervals="{Binding Intervals, Mode=OneWayToSource}"/>
  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 07 Aug 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top