1
我正试图动态绑定MenuItem
。动态绑定MenuItems
我有public List<string> LastOpenedFiles { get; set; }
是我的数据源。 我的命令,我尝试运行是public void DoLogFileWork(string e)
<MenuItem Header="_Recent..."
ItemsSource="{Binding LastOpenedFiles}">
<MenuItem.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Header"
Value="What should be here"></Setter>
<Setter Property="Command"
Value="What should be here" />
<Setter Property="CommandParameter"
Value="What should be here" />
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
我想从LastOpenedFiles
每个条目是我点击它,才能进入我点击的入账价值DoLogFileWork
功能。
感谢您的协助。
感谢您的帮助,您真的很有帮助。 – 2013-04-21 19:22:26