我有一个带有上下文菜单的devexpress ListBoxEdit控件。 听到的是我的设计。
<dxe:ListBoxEdit x:Name="lstEventsList" Grid.Column="1" Grid.Row="3" Tag="{Binding DataContext}" >
<mvvm:Interaction.Triggers>
<mvvm:EventToCommand EventName="SelectedIndexChanged" Command="{Binding GetReferenceCodeListOnEventSelect}" PassEventArgsToCommand="True" />
</mvvm:Interaction.Triggers>
<dxe:ListBoxEdit.ContextMenu>
<ContextMenu DataContext="{Binding PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
<MenuItem Command="{Binding SyncToMediaDevice}" Header="SYNC"
CommandParameter="{Binding}"/>
</ContextMenu>
</dxe:ListBoxEdit.ContextMenu>
</dxe:ListBoxEdit>
现在问题是菜单上下文命令不起作用。绑定属性是
public ICommand SyncToMediaDevice
{
get
{
return _syncToMediaDevice;
}
set
{
_syncToMediaDevice = value;
}
}`
请帮助我谢谢。