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

Setting PeriodStart/End and VisiblePeriodStart/End at the same time via bindings

3 Answers 105 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 22 May 2013, 05:41 PM
In my MVVM application, there is a RadTimeBar hosting a RadAreaSparkline to give the user an overview of the data.  When a period of time is selected, the SelectionStart and SelectionEnd values are used to query a detailed set of data that is then displayed in a RadTimeline.

After the selection is made, I would like the RadTimeline to have its PeriodStart/End set to match the SelectionStart/End times of the RadTimeBar.  This functionality is working.

At the same time that the RadTimeline has its PeriodStart/End set, I would like to set its VisiblePeriodStart/End to change to show the whole period.  Once this has been done, however, the user should be able to zoom the RadTimeline as normal.

The properties for the RadTimeBar and RadTimeline are bound to properties on my ViewModel.  However, what ends up happening is that after changing the PeriodStart/End, my changes to VisiblePeriodStart/End are overridden in TimeBarBase.CoerceVisiblePeriod(), as my calls to set VisiblePeriodStartart/End are being done before the PeriodStart/End DependencyProperty have been properly updated.

So what ends up happening is that sometimes I get what I want: i.e.VisiblePeriodStart/End being the same as PeriodStart/End, but other times, VisiblePeriodStart/End are set to the PREVIOUS values of PeriodStart/End.

Is there a proper set of steps that I am missing to make this work?

Thanks for your help

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 23 May 2013, 08:17 AM
Hi James,

We are aware of this problem. Basically, the correct approach depends on the concrete scenario. That is why, I cannot tell you whether you can achieve the result you want, unless I examine your code.

On a side note, because of cases like yours, we have made major refactoring of the coercing mechanism in RadTimeline and RadTimeBar. You can test your code with the latest internal build to see if it fixes your problem as well. The fix will also be part of Q2 2013. 

Regards,
Tsvetie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
James
Top achievements
Rank 1
answered on 23 May 2013, 12:28 PM
Thanks for getting back to me quickly.  I can live with the current behaviour for now; perhaps the Q2 build will be out before I need to release my application.
0
Tsvetie
Telerik team
answered on 23 May 2013, 02:03 PM
Hi James,

The official Q2 2013 release is scheduled for the middle of June and we will release a RC in the end of May.

Regards,
Tsvetie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TimeLine
Asked by
James
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
James
Top achievements
Rank 1
Share this question
or