Reputation: 3105
how do i pass command param from MenuItem
<MenuItem CommandParameter="{Binding this, ElementName=Header}" />
OR how to pass a hardcoded string like
<MenuItem CommandParameter="something" />
I am using mvvm light, wpf
Upvotes: 1
Views: 1830
Reputation: 24723
Try...
<MenuItem CommandParameter="{Binding RelativeSource={RelativeSource Self},
Path=Header}"/>
Upvotes: 5