Binding SelectionStart and SelectionEnd to ViewModel

4 posts, 0 answers
  1. Nick
    Nick avatar
    3 posts
    Member since:
    Jun 2010

    Posted 24 May 2011 Link to this post

    I will start by saying that I love the new RadTimeBar control.  It was exactly the sort of control we needed for our app that is currently under development.

    As soon as I got the control, the first thing I tried was to bind PeriodStart, PeriodEnd, SelectionStart and SelectionEnd up to my ViewModel.  This hasn't worked very well though.  Binding PeriodEnd and PeriodStart in XAML would work only if I did the bindings in that order (ie: end first and then start).  Unfortunately VisiblePeriodEnd would always equal VisiblePeriodStart which always equalled PeriodStart so the user would have to stretch it out.  After adjusting VisiblePeriodEnd, it would then lock up at PeriodEnd and not be changeable any more.  In the end, I decided to set PeriodStart, PeriodEnd, VisiblePeriodStart and VisiblePeriodEnd to the required values from the ViewModel in the View's DataContextChanged event.  This set everything correctly and enabled the user to then adjust both VisiblePeriodStart and VisiblePeriodEnd.

    Anyway, on to my main issue.  I am binding SelectionStart and SelectionEnd in XAML to my ViewModel and it works kinda ok but not really great.  My ViewModel validates the date range selection that the user has asked set using the TimeBar and then stores the validated value instead of the user requested value.  The problem I have is that if the user selects a date range with the TimeBar that when validated results in the same values that are already stored, even though I raise the PropertyChanged events for the properties that SelectionStart and SelectionEnd are bound to, the visual selection on the screen does not update (ie: revert to the previous values that were valid) and instead keeps the user requested values.   I don't see this as as a bug as such as I can see you guys developed the control with it's own validation, but if this is a feature that could be added it would be much appreciated.  For now, as our app is still under development, we are ok with releasing the current functionality to our beta testers as is, but we'd love to have this changed if possible.  In fact, I would love it if I could bind to the ViewModel not just SelectionStart and SelectionEnd but PeriodStart and PeriodEnd as well.

    Hope that all made sense =)

    Cheers,

    Nick Barrett
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 27 May 2011 Link to this post

    Hello Nick,
    We are aware of the problem, when binding PeriodStart and PeriodEnd properties and we will fix it for the upcoming beta release.

    Regarding the second problem that you have - I spent some time researching it, and it turns out that the properties of the time bar control have the corrected values and that only the UI of the control is not updated properly. I will log this problem in our data base and we will do our best to fix it for the official Q2 2011 release.

    Kind regards,
    Tsvetie
    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Nick
    Nick avatar
    3 posts
    Member since:
    Jun 2010

    Posted 29 May 2011 Link to this post

    Thanks Tsvetie for the reply.  We're looking forward to you guys resolving these.

    Do you have issue ID's so that I can track them?

    Cheers,

    Nick Barrett
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 01 Jun 2011 Link to this post

    Hello Nick,
    Regarding the first problem - about binding PeriodStart and PeriodEnd properties, there is no item in the PITS system, but I can tell you that we have already fixed it.

    For information on the second problem, please follow this link - http://www.telerik.com/support/pits.aspx#/public/silverlight/6333.

    Best wishes,
    Tsvetie
    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
Back to Top