WPF StackPanel with Click AND DoubleClick
问题 I need to be able to handle the double click and single click event on the WPF StackPanel. But there is no such thing as the StackPanel's DoubleClick Event. I want to do 2 different operations in these 2 EventHandlers. Any idea how to do that? Thank you 回答1: The best way is to right your own mouse button handler with a timeout - if the event is fired again within the timeout period, then fire your doubleclick message, otherwise call the single click handler. Here's some sample code ( Edit: