I wanted to remove Background Change on hover of my menuItems. For Buttons this works great:
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
But for MenuItem I tried mostly everything but These two are kinda Close to what I want to have.
Here everything works except if I click it nothing happens:
<Grid Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Header}"/>
</Grid>
Or number 2, whit this the hover Color and the Header dont work but the click works:
<Grid Background="{TemplateBinding Background}">
<MenuItem HorizontalAlignment="Center" VerticalAlignment="Center" Header="{TemplateBinding Header}"/>
</Grid>
The same happens if I replace Grid with Border.
What is wrong here?