Command bind to ContextMenu (which on ListBoxItem in ListBox) don't work [duplicate]
问题 This question already has an answer here : ContextMenu Command Binding to parent and to self (1 answer) Closed 3 years ago . In WPF, with MVVM light, there's a Class (which is consist of some students), and the Class hold some Student s. Right-Click one Student's name, then will show a MessageBox , it is ok in this way: ClassDetailView.xaml <UserControl DataContext="{Binding ClassDetail, Source={StaticResource Locator}}"> <DockPanel> <ListBox ItemsSource="{Binding Students}" DisplayMemberPath