title: Attached behaviors and styles
body: <p>I use an attached behavior that allows a DoubleClick event to be wired to a command in a view model, as in the binding below:</p>
  
  <pre><code>&lt;ListBox Style="{StaticResource MasterListBoxStyle}"
      b:SelectionBehavior.DoubleClickCommand="{Binding EditCommand}" 
       &gt;
  </code></pre>
  
  <p>I need multiple list boxes for a presentation, all of which will need a DoubleClick wired to an EditCommand.</p>
  
  <p>Can I push this behavior into my MasterListBoxStyle? How?</p>
  
  <p>Cheers,<br>
  Berryl</p>
  
  <pre><code>&lt;Style x:Key="MasterListBoxStyle" TargetType="ListBox"&gt;
      &lt;Setter Property="ItemsSource" Value="{Binding MasterVm.AllDetailVms}" /&gt;
      &lt;Setter Property="ItemContainerStyle" Value="{StaticResource MasterListingRowStyle}" /&gt;
      &lt;Setter Property="IsSynchronizedWithCurrentItem" Value="True" /&gt;
      &lt;Setter Property="AlternationCount" Value="2" /&gt;
  &lt;/Style&gt;
  </code></pre>