maui
maui copied to clipboard
Implict styling of NavigationPage IconColor does not work
Description
I wanted to change the colour of the back button of a MAUI app as it is always black. I added the following code directly to the ContentPage XAML base class and it worked fine.
<NavigationPage.IconColor>
<Color>White</Color>
</NavigationPage.IconColor>
Rather than add this to every XAML page, I created an implicit style, but it does not work as expected, the icon stays black.
<Style ApplyToDerivedTypes="true" TargetType="NavigationPage">
<Setter Property="IconColor" Value="White" />
</Style>
Steps to Reproduce
Create a non shell application, add the XAML to change the colour of the back button, ensure it works, remove it, and then add an implicit style. The colour should not change using the style.
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
Yes, just apply the XAML to each page, not ideal but it works.
Relevant log output
No response
This is the same for me. Is this a bug?