title: programmatically bind button to double click command wpf
body: <p>I have the following <code>ListBox</code>:</p>
  
  <pre><code>&lt;ListBox x:Name="SequencesFilesListBox" ItemsSource="{Binding SequencesFiles, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="DarkBlue" BorderBrush="Transparent" /&gt;
  </code></pre>
  
  <p>The <code>SequencesFiles</code> defined as <code>ItemsSource</code> is an <code>ObservableCollection&lt;Button&gt;</code>.</p>
  
  <p>I'm manually adding new <code>Buttons</code> to the collections using the following function:</p>
  
  <pre><code>private void AddSequenceToPlaylist(string currentSequence)
  {
      if (SequencesFiles.Any(currentFile =&gt; currentFile.ToolTip == currentSequence)) return; 
  
      var newSequence = new Button
      {
          ToolTip = currentSequence,
          Background = Brushes.Transparent,
          BorderThickness = new Thickness(0),
          HorizontalAlignment = HorizontalAlignment.Stretch,
          HorizontalContentAlignment = HorizontalAlignment.Stretch,
          Content = Path.GetFileName(currentSequence),
          Command = PlaylistLoadCommand,
          CommandParameter = currentSequence,
      };
      SequencesFiles.Add(newSequence);
  }
  </code></pre>
  
  <p>Is it possible to call the <code>Command</code> (<code>PlaylistLoadCommand</code>) upon double-click and not upon click?</p>