I have the following context menu on the header of a column in a datagridview.
<DataGridCheckBoxColumn Binding="{Binding Include,UpdateSourceTrigger=PropertyChanged}" Width="50">
<DataGridCheckBoxColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="Export">
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Header="Alle auswaehlen"/>
<MenuItem Header="Alle abwahelen"/>
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
</DataTemplate>
</DataGridCheckBoxColumn.HeaderTemplate>
</DataGridCheckBoxColumn>
As you can see, the context menu is static. How can I map the Command attribute to static methods in my code? All examples I found online were for flexible binding or for cut/copy.