I ran through one issue, need to apply conditional styling on Menu Item, here is a bit from my Code-Snippet:
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,10,0,0">
<Menu HorizontalAlignment="Left" KeyboardNavigation.TabNavigation="Once" Background="Transparent" d:LayoutOverrides="Height">
<MenuItem Header="Menu1" Style="{DynamicResource M_Left}" />
<MenuItem Header="Menu2" Style="{DynamicResource M_Middle}" />
<MenuItem Header="Menu3" Style="{DynamicResource M_Right}" Visibility="{Binding IsEligibleToDisplay, Converter={StaticResource MyVisibilityConverter}}" />
</Menu>
</Grid>
In above, IsEligibleToDisplay a bool property and MyVisibilityConverter sets Visibility either to Visible or Hidden on the basis of True or false.
What is expected?
If Visibility of "Menu3" is Hidden i.e. IsEligibleToDisplay = false then Style of "Menu2" should be Style="{DynamicResource M_Right}" otherwise Style="{DynamicResource M_Middle}"
Something like (its just hypothetic, please do not check syntax - its wrong:)):
<MenuItem Header="Menu2" Style="IsEligibleToDisplay ? {DynamicResource M_Middle} : {DynamicResource M_Right}" />
Any help will be highly appreciated!