WPF
<ListBox Name="ItemList"
ItemsSource="{Binding XXX}"
SelectedItem="{Binding Path=XXX, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, Mode=TwoWay}"
DisplayMemberPath="XXX">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Create" Command="{Binding CreateNewItemCommand}"/>
<MenuItem Header="Clone" Command="{Binding CloneSelectedItemCommand}"/>
<MenuItem Header="Delete" Command="{Binding DeleteSelectedItemCommand}"/>
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
Активность кнопок меню определяется свойством во ViewModel по имени YYYCommand в .
Команды