I have a context menu. It's bound to some collection and it has a defined ItemTemplate like this:
<ContextMenu
ItemsSource={Binding ...}
ItemTemplate={StaticResource itemTemplate}
/>
itemTemplate is a simple DataTemplate with a TextBlock:
<DataTemplate x:Key="itemTemplate">
<TextBlock Text={Binding ...} />
</DataTemplate>
How do I bind Command property for MenuItem to the underlying object's property?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…