1
嗨我試圖將eventargs傳遞給我在ViewModel中綁定的comman。如果我不使用PassEventArgsToCommand =「True」,一切正常。但是如果把PassEventArgsToCommand =「True」比應用程序中斷。你有類似的問題嗎?mvvm light PassEventArgsToCommand在ListBoxDragDropTarget中打破應用程序
<Controls:ListBoxDragDropTarget Grid.Column="1" AllowDrop="true" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Drop">
<GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding PersonDrop, Mode=OneWay}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox x:Name="fromListBox" ItemsSource="{Binding Person, Mode=TwoWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name, Mode=TwoWay}"></TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Controls:ListBoxDragDropTarget>