title: Handling both Click and Double Click using Reactive.NET RX
body: <p>I have a WPF Button in .NET and I wish to handle both the click and double click events separately.  I've currently got this working using Timeouts/Delays and it works but its ugly. I'm trying to find a neat way to do it using System.Reactive extensions for .NET</p>
  <p>The Observables are created from a factory method where I pass the button, and I use the FromEventPattern(button, &quot;click&quot;) method.  e.g:</p>
  <pre><code>    public IObservable&lt;EventPattern&lt;RoutedEventArgs&gt;&gt; SingleClickTestObservable(Button button)
      {
          return Observable.FromEventPattern&lt;RoutedEventArgs&gt;(button, &quot;Click&quot;);
      }
  
      public IObservable&lt;EventPattern&lt;RoutedEventArgs&gt;&gt; DoubleClickTestObservable(Button button)
      {
          return Observable.FromEventPattern&lt;RoutedEventArgs&gt;(button, &quot;DoubleClick&quot;);
      }
  </code></pre>
  <p>The problem is when I subscribe to these Observables, the SingleClick fires for both single and double click.</p>
  <p>How can make this work as intended, so that when a double click is triggered, a single click is not.</p>