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>