Get accurate size of the TimeRuler

4 posts, 0 answers
  1. Pete
    Pete avatar
    67 posts
    Member since:
    Sep 2012

    Posted 12 Jan 2012 Link to this post

    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
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 17 Jan 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. Pete
    Pete avatar
    67 posts
    Member since:
    Sep 2012

    Posted 19 Jan 2012 Link to this post

    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
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 24 Jan 2012 Link to this post

    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 >>
Back to Top