question

Lex-8710 avatar image
0 Votes"
Lex-8710 asked ·

[UWP] NavigationView items foreground color not working when PaneDisplayMode changed

I want to change the font color of the MenuItems for the NavigationView control in my sample application the only issue is that when I change PaneDisplayMode="Left" to PaneDisplayMode="Top" the color change stops working goes back to the default black color.

UWP settings : Target version 1903 (10.0; Build 18362)
Min version 1903 (10.0; Build 18362)

alt text

alt text





alt text


I also used the following code in App.xaml to change the font color still the same issue

alt text



uwpuwp-xaml
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichardZhang-MSFT avatar image
1 Vote"
RichardZhang-MSFT answered ·

Hello,​

Welcome to our Microsoft Q&A platform!

Thank you for your report, we are contacting an engineer to resolve this issue.

As a workaround, you can consider using the following method to set the text color of NavigationViewItem.

<NavigationViewItem Icon="Home" Tag="Home">

<TextBlock Text="Home" Foreground="Purple"/>

</NavigationViewItem>

You can fix the color of the text by setting the color of the TextBlock.

Thanks.

· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Workaround is working Great! Hopefully this gets resolved soon. Much appreciated for the help.

0 Votes 0 · ·