Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimeLine > VisiblePeriodStart changes unpected

Not answered VisiblePeriodStart changes unpected

Feed from this thread
  • KS avatar

    Posted on Apr 25, 2012 (permalink)

    Hi,

    I am trying to use timeline component, and here is what I write in (view) xaml file,

    <telerik:RadTimeline Height="80"
                         PeriodStart="{Binding StartDate, Mode=TwoWay}"
                         PeriodEnd="{Binding EndDate, Mode=TwoWay}"
                         VisiblePeriodStart="{Binding VisibleStart, Mode=TwoWay}"
                         VisiblePeriodEnd="{Binding VisibleEnd, Mode=TwoWay}"
                         StartPath="Date"
                         DurationPath="Duration"
                         ItemsSource="{Binding Results}">

    and in the (view model) code behind,
    private void InitTimeRange()
    {
        StartDate = DateTime.Today;
        EndDate = StartDate.AddDays(1);
     
        DateTime now = DateTime.Now;
        VisibleStart = now.AddMinutes(-30);
        VisibleEnd = now.AddMinutes(30);
    }

    and turns out the VisibleStart is forced to set as StartDate, it looks like be changed at 
    TimeBarBase.CoerceVisiblePeriod(),
    while VisibleEnd seems to be correct, 

    is it a calling sequence issue here? how can I fix this?

    Thanks


    Reply

  • Peshito Peshito admin's avatar

    Posted on Apr 30, 2012 (permalink)

    Hello,

    The VisiblePeriodStart cannot be less then the StartDate. In order to be able to display the VisiblePeriodStart in the way you have defined it in your code, you will also need to change your PeriodStart date. On the other hand the VisibleEnd is correct because your EndDate is bigger.

    You can find more information here:
    http://www.telerik.com/help/silverlight/radtimeline-properties.html

    Hope this helps.

    Kind regards,
    Peshito
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • KS avatar

    Posted on May 1, 2012 (permalink)

    Hi,

    Actually, I do think the range is appropriate,

    -----+----------------------------------+-------------------------------+-------------------------------------+-----
    StartDate                           VisibleStart                       VisibleEnd                                   EndDate

    2012/05/01                         2012/05/01                      2012/05/01                               2012/05/02
    AM 12:00:00                      AM 11:30:00                    PM 12:30:00                              AM 12:00:00
     
    here is an example of my time settings, you can also see it in the attached code behind,

    there are two corner cases that it exceeds the bound as you mentioned, but not the most of other cases

    actually, I have assign the values (like above) directly in xaml and that works,

    furthermore, if I hardcode to "initialize" in the constructor like
    InitializeComponent();
     
    this.timeline.PeriodStart = DateTime.Today;
    this.timeline.PeriodEnd = DateTime.Today.AddDays(1);

    it also works, I think the issue is the initial value of PeriodStart is unexpected
    and there is a calling sequence issue when directly binding in xaml


    Reply

  • Tsvetie Tsvetie admin's avatar

    Posted on May 1, 2012 (permalink)

    Hi,

    Unfortunately, the information that you have provided is not enough for me to determine the cause for the problem that you describe in your last post. The behavior that you described with the concrete settings in your original post is expected, because the Visible period must be a subset of the whole Period that the timeline visualizes, just as Peshito explained.

    I will need some additional information on your scenario, in order to be able to find the cause for the problem from your last post. For example:
    • What is your concrete setup
    • What steps do you follow in order to reproduce the problem
    • What is the concrete problem

    It would be best if you open an official support ticket and send us a simple running project, demonstrating this problem, together with concrete steps for reproducing it.

    Regards,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimeLine > VisiblePeriodStart changes unpected