Closed tmdakm closed 1 month ago
this is xaml file of the window:
<Window
x:Class="LMC.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Controls;assembly=Wpf.Ui"
xmlns:local="clr-namespace:LMC"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid Background="#FF1D1D1D">
<ui:NavigationView PaneDisplayMode="LeftFluent" IsPaneVisible="True">
<ui:NavigationView.MenuItems>
<ui:NavigationViewItem Content="Home" Icon="Home24"/>
</ui:NavigationView.MenuItems>
</ui:NavigationView>
<ui:Button Icon="Home24" Content="Home" Margin="79,10,0,0" VerticalAlignment="Top"/>
</Grid>
</Window>
Not only that. I think the whole navigation is broken? Icons not working and selecting items also does not work?
The Icon
property of the NavigationViewItem
requires IconElement
, not the symbol name.
<ui:NavigationViewItem
Content="Dashboard"
NavigationCacheMode="Enabled"
TargetPageType="{x:Type pages:DashboardPage}">
<ui:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="Home24" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
Describe the bug
I added a button and a navigationviewitem in Dark theme window, and set their icon to "Home24", but it's not working. Light theme too ui:SymblolIcon is working.
To Reproduce
create new window and add
to its xaml file.
Expected behavior
I can see icons in window
Screenshots
OS version
Windows 11
.NET version
.netframework 4.7.2
WPF-UI NuGet version
3.0.4 and 3.0.3
Additional context
No response