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
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