以下のバインディングのように、DoubleClickイベントをビューモデルのコマンドにワイヤリングできるようにする添付の動作を使用します。
<ListBox Style="{StaticResource MasterListBoxStyle}"
b:SelectionBehavior.DoubleClickCommand="{Binding EditCommand}"
>
プレゼンテーション用に複数のリストボックスが必要です。すべてのリストボックスには、EditCommandに接続されたDoubleClickが必要です。
この動作をMasterListBoxStyleにプッシュできますか?どのように?
乾杯、
ベリール
<Style x:Key="MasterListBoxStyle" TargetType="ListBox">
<Setter Property="ItemsSource" Value="{Binding MasterVm.AllDetailVms}" />
<Setter Property="ItemContainerStyle" Value="{StaticResource MasterListingRowStyle}" />
<Setter Property="IsSynchronizedWithCurrentItem" Value="True" />
<Setter Property="AlternationCount" Value="2" />
</Style>