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

Get accurate size of the TimeRuler

3 Answers 31 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 12 Jan 2012, 06:10 PM
Hi
I have a custom control that I've added above the timeruler in the scheduleview. 
I would like to set the width to be same as the timeruler (I need to set the widths of boxes inside the control) - at the moment I am binding to MinTimeRulerExtent but I have checked in Silverlight Spy and this is always longer than the width of the timeruler (return 1400). TimeRuleLength returns 41.

The actual length of the time ruler is about 1200 or 1300 pixels.

Thanks

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 17 Jan 2012, 12:29 PM
Hello,

You should also set the MaxTimeRulerExtend property. In that way the boundaries of the TimeRuler will be set and it will resize properly.

Hope this helps.

Greetings,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Pete
Top achievements
Rank 1
answered on 19 Jan 2012, 10:40 AM
Thanks. I have set the MaxTimeRulerExtent to 5000 and the MinTimeRulerExtent to 1000. I am using the Timeline view horizontally.
I have a slider that is bound to the MinTimeRulerExtent so I can zoom in and out.
This works OK but I have noticed that when the MinTimeRulerExtent is less than 1250, the width of the TimeRuler doesn't match the MinTimeRulerExtent property.

i.e.
MinTimeRulerExtent = 1000, TimeRuler Width = 1250
MinTimeRulerExtent = 2000, TimerRule Width = 2000
MinTimeRulerExtent = 3000, TimerRule Width = 3000 
MinTimeRulerExtent = 4000, TimerRule Width = 4000 
MinTimeRulerExtent = 5000, TimerRule Width = 5000 

Is there a reason why this is the case?

Thanks
0
Konstantina
Telerik team
answered on 24 Jan 2012, 08:05 AM
Hi Pete,

Could you please review the attached project and let us know if it helped to resolve the issue.
Otherwise, please send us a sample working project, which we can run here in order to debug it and track down the source of the problem.

Kind regards,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ScheduleView
Asked by
Pete
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Pete
Top achievements
Rank 1
Share this question
or