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
1415
Handle Double Click?
posted

Hello, I am trying to bring up a custom dialog of task properties when a user double clicks on a row in the chart.

I seem to be having trouble identifying a double click.

MouseLeftButtonDown event doesn't seem to work since I think the control is swallowing most mouse clicks.

How can I accomplish this?

  Greg

Parents
  • 34830
    Verified Answer
    Offline posted

    Hello Greg,

    To handle a double-click on the xamGantt, I would recommend starting by handling the Loaded event on it. In this event, you can call MyXamGantt.AddHandler(XamGantt.MouseLeftButtonDownEvent, new MouseButtonEventHandler(myHandler), true);

    The MouseLeftButtonDown event is already marked as handled in the XamGantt, which is why you cannot handle it directly. The “true” in the above code tells the application to utilize the new event handler anyway. In the event handler, use the MouseButtonEventArgs object and check the ClickCount property on it. If it is 2, that is a double click. You can pop up your dialog here.

    I have attached a sample application to demonstrate the above.

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

    Sincerely,
    Andrew
    Developer Support Engineer I
    Infragistics Inc.
    www.infragistics.com/support

    XamGanttDoubleClickCase.zip
Reply Children
No Data