Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Moving the thumb and the event points just like it's in a slider control
posted

Hello,

I would like to do so to be able to move the timeline thumb and the event points on the DateTimeAxis just like in a slider control. I saw an example of event points dragging, yes. But what I wanted is:

1) to freely move these parts horizontally, without sticking to the ticks (or optionally).
2) to set the thumb position somewhere by click.

I'm using it with hidden Zoombar, only the top part of the timeline control.

Thanks!
-Konstantin

Parents
  • 34510
    Verified Answer
    Offline posted

    Hi Konstantin,

    Unfortunately the built in selection thumb that you are referring to is designed to snap to event points specifically.  That is to say, we have code that specifically looks for the closest point to where the mouse is and it then sets an internal property called SelectedTimeValue to that point.  We then position the thumb at the SelectedTimeValue.  So in order to support the ability to smoothly slide between event points like you require would mean we would have to alter the code that calculates the SelectedTimeValue.  I recommend that you submit this as a product idea for the XamTimeline so that we may consider adding this functionality to the product in the future.  You can do so here: http://ideas.infragistics.com.

    Something you could possibly do as a workaround would be to overlay your own Canvas element over the timeline axis and then add your own Thumb to that canvas, positioned over the axis.  You can them implement the dragging as if it were a slider control and depending on where the mouse is, calculate if the custom thumb is over an event and then set the SelectedTime property of the axis to match the event.  You can use the axis GetWindowBasedPixelValue() method in order to take a mouse position and convert it to a value on the axis.

Reply Children
No Data