ListBox的ContextMenu的MenuItem的CommandParameter绑定ListBox的SelectedItems
<ListBox>
<ListBox.ContextMenu>
<MenuItem Command={Binding XXCommand}
CommandParameter={Binding RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}},Path=PlacementTarget.SelectedItems}/>
The ListBox is not a visual ancestor of the ContextMenu because the latter resides in its own visual tree.
But you could bind to the PlacementTarget of the ContextMenu,which is ListBox