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
XamDataChart raises no PreviewMouseDown / MouseDown event when using a touch screen
posted

Hi,

 

I am using a XamDataChart in my WPF application and I am using Infragistics WPF 2015.2.

When I am using the XamDataChart with the mouse all events are fired as expected.

When I am doing the same with a touch screen then I expect the same behavoir like for a standard WPF control (e.g. label) but with the XamDataChart I am missing the PreviewMouseDown / MouseDown event.

Standard behavior on touch:

  • PreviewStylusDown
  • StylusDown
  • PreviewTouchDown
  • TouchDown
  • PreviewMouseDown
  • MouseDown

XamDataChart behavior on touch:

  • PreviewStylusDown
  • StylusDown
  • PreviewTouchDown
  • TouchDown

Is this an intentional behavior (e.Handled = true in TouchDown?) or a bug in XamDataChart? If it is an intentional behavior is it possible to suppress this behavior?

Thank you in advance

André

Parents
No Data
Reply
  • 34430
    Verified Answer
    Offline posted

    Hello Andre,

    Thank you for your post.

    The behavior that you are currently seeing with the XamDataChart touch events appears to be intentional. I have been looking into the source code of the XamDataChart, and it appears that we are handling the Touch-related events internally. As these touch-related events are handled, the WPF framework will not send the mouse events, as they are essentially ignored.

    I don't believe there currently exists a way to suppress this behavior in the chart at the moment, but you may want to consider following the examples given at the following forum thread about raising your mouse event handlers in your touch events: http://stackoverflow.com/questions/11245551/how-to-get-touchscreen-to-use-mouse-events-instead-of-touch-events-in-c-sharp-ap.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Children