Pane menu items' FontSize cannot be changed
Describe the bug
According to the screenshot, the FontSize property doesn't work for the Pane menu items, and it's too large in comparison to other similar apps.
To Reproduce
Just create a NavigationView menu and add some menu items as below:
<ui:NavigationView
FrameMargin="0"
IsBackButtonVisible="Collapsed"
IsPaneToggleVisible="False"
OpenPaneLength="60"
PaneDisplayMode="LeftFluent">
<ui:NavigationView.MenuItems>
<ui:NavigationViewItem
Content="Home"
FontSize="7" <!-- Not Working -->
Icon="{ui:SymbolIcon Home24}">
</ui:NavigationViewItem>
</ui:NavigationView.MenuItems>
</ui:NavigationView>
Expected behavior
Setting the FontSize property should change the size of the font.
Screenshots
OS version
Windows 11
.NET version
.NET 8.0.1
WPF-UI NuGet version
3.0.0
Additional context
No response
While only a band aid, this is how I handled it for myself.
<ui:NavigationViewItem>
<ui:NavigationViewItem.Icon>
<ui:FontIcon FontSize="9" FontFamily="{DynamicResource SegoeFluentIcons}" Glyph="" />
</ui:NavigationViewItem.Icon>
<ui:NavigationViewItem.Content>
<TextBlock FontSize="9" Text="Payments" />
</ui:NavigationViewItem.Content>
</ui:NavigationViewItem>
Note that you can remove FontSize off of the FontIcon for it to auto size. Personally, I found FontIcon tends to scale better than SymbolIcon.
Thank you! It's a nice workaround ...
While only a band aid, this is how I handled it for myself.
<ui:NavigationViewItem> <ui:NavigationViewItem.Icon> <ui:FontIcon FontSize="9" FontFamily="{DynamicResource SegoeFluentIcons}" Glyph="" /> </ui:NavigationViewItem.Icon> <ui:NavigationViewItem.Content> <TextBlock FontSize="9" Text="Payments" /> </ui:NavigationViewItem.Content> </ui:NavigationViewItem>Note that you can remove
FontSizeoff of theFontIconfor it to auto size. Personally, I found FontIcon tends to scale better than SymbolIcon.