How to set default selection time span?

2 posts, 0 answers
  1. Marco
    Marco avatar
    4 posts
    Member since:
    May 2013

    Posted 27 Jun 2013 Link to this post

    Hello Everyone,

    I am using RadTimeBar to pick a clip from a long video. The problem i have is that i have no way to set default length of the clip by using RadTimeBar. For example, I have  a 72-hr video which is represented as a RadTimeBar. When i click on a point on the TimeBar, I want to always select a 10 sec clip starting at the time point i clicked and ending at 10 sec later. And this selection range should never be changed if i zoom in/out the TimeBar.

    Is there a way to set such selection range?

    Thanks for help!

    -Marco
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 02 Jul 2013 Link to this post

    Hello Marco,

    You can use the MinSelectionRange property to specify the minimum possible selection in the timeBar control. In your case, this should be TimeSpan of 10 seconds. In case you need this to be the maximum possible selection as well, you can use the MaxSelectionRange property.

    However, the selection on mousedown of the timeBar, selects the currently hovered period item from its start. It does not use the position of the mouse. For example, in case you have zoomed in to hours and you move the mouse over the period item that represents 12 o'clock and click it, the timeBar will select a period of 10 seconds, starting at 12 o'clock, not starting at the position where you clicked.

    This behavior is suggested by the hover effects of the period items as well - when you hover a period item, it is highlighted, suggesting that a click would select the whole item. 

    In case you decide to try and change this behavior, you should:

    1. Remove the hover effects so that these are not misleading to the user.
    2. Remove the built-in selection feature.
    3. Implement your own version of the selection feature.

    Please note that this would require both changing the Styles of the control and its built-in behavior.

    Regards,
    Tsvetie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top