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
160
MouseUp & XamDataGrid
posted

I am trying to use MouseUp event on a image hosted inside a XamDataGrid cell. I tried to attach it to the image or to the CellValuePresenter. In both cases the MouseUp event behaves erratically: sometimes is triggered and sometimes is not. Same goes with the PreviewMouseUp event. The MouseDown on the other hand works fine.

Is there any method to correct for this behaviour?

Thanks,

Radu

 

  • 9694
    posted

    I apologize that no one has yet answered this post. We were inundated with more posts than we had resources to cover. Since that time we have been adding people to the task of making sure every post gets a reply from an Infragistics employee.

    The key to MouseUp is capturing the mouse on a MouseDown event. Unless you capture the mouse, there is no guarantee that you will receive the MouseUp event.

    In a MouseDown event handler you can call: (sender as UIElement).CaptureMouse(). You should call ReleaseMouseCapture in the MouseUp event.

    Thank you,