Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何传递命令参数MenuItem
MenuItem
<MenuItem CommandParameter="{Binding this, ElementName=Header}" />
或者如何传递一个硬编码的字符串,比如
<MenuItem CommandParameter="something" />
我正在使用 mvvm light,wpf
尝试...
<MenuItem CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Header}"/>