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
903
Ultratimelineview vertical scroll fires ultraimelineview_click ?
posted

Hi Team,

I have linked to events "Mouse Click", few lines of business code in an application (regarding the button clicked and the selected items, I can then display a popup menu if right click is used for example)

My problem is that when using the scrolling bar, the same event is fired and I have no way to tell the system that this is a scrolling event so all the business logic is triggered again and it is very time cost effective !

Is there a better way to handdle that ?

Parents
No Data
Reply
  • 23930
    Offline posted

    Hi Yannick,

     

    Thank you for positing in our forums.

     

    What you could do is to check which UIElement was click before executing your business logic. You can do that by using the ElementFromPoint method of the UltraTimeLineView.UIElement. Then you can use the GetContext method of the clicked UIElement and see if it has a context of type ScrollBarInfo. If it has then the user is scrolling and you shouldn’t do anything. Otherwise you can be sure that the user hasn’t clicked the scrollbar and you can execute your business logic.

     

    I have attached a sample in order to demonstrate this suggestion.

     

    Please let me know if you have any additional questions.

    WTLV_DetermineWhenScrolling.zip
Children
No Data