Skip to content

Commit

Permalink
Use FontIcon for NavigationView
Browse files Browse the repository at this point in the history
  • Loading branch information
NotYoojun committed Nov 22, 2024
1 parent efc46b5 commit dd73828
Showing 1 changed file with 17 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:muxc="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="NavigationView Page"
d:DesignWidth="800"
d:DesignWidth="1206"
mc:Ignorable="d">
<ui:Page.Resources>
<converters:MenuItemTemplateSelector x:Key="selector">
Expand Down Expand Up @@ -68,12 +68,11 @@
</ui:ResourceDictionaryEx>
</StackPanel.Resources>

<local:ControlExample
<local:ControlExample x:Name="Example1"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
HeaderText="NavigationView with default PaneDisplayMode"
WebViewHeight="250"
XamlSource="NavigationView\NavigationViewSample1.txt">
WebViewHeight="250">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down Expand Up @@ -128,12 +127,11 @@
</Grid>
</local:ControlExample>

<local:ControlExample
<local:ControlExample x:Name="Example2"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
HeaderText="NavigationView with PaneDisplayMode set to Top"
WebViewHeight="200"
XamlSource="NavigationView\NavigationViewSample2.txt">
WebViewHeight="200">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down Expand Up @@ -165,12 +163,11 @@
</Grid>
</local:ControlExample>

<local:ControlExample
<local:ControlExample x:Name="Example3"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
HeaderText="NavigationView that switches pane orientation based on window width"
WebViewHeight="450"
XamlSource="NavigationView\NavigationViewSample3.txt">
WebViewHeight="450">
<Grid x:Name="InnerGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down Expand Up @@ -203,13 +200,11 @@
</Grid>
</local:ControlExample>

<local:ControlExample
<local:ControlExample x:Name="Example4"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
CSharpSource="NavigationView\NavigationViewSample4_cs.txt"
HeaderText="Tying selection and focus - Tabs"
WebViewHeight="800"
XamlSource="NavigationView\NavigationViewSample4_xaml.txt">
WebViewHeight="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down Expand Up @@ -241,13 +236,11 @@
</Grid>
</local:ControlExample>

<local:ControlExample
<local:ControlExample x:Name="Example5"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
CSharpSource="NavigationView\NavigationViewSample5_cs.txt"
HeaderText="Data binding"
WebViewHeight="950"
XamlSource="NavigationView\NavigationViewSample5_xaml.txt">
WebViewHeight="950">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
Expand Down Expand Up @@ -275,11 +268,10 @@
</Grid>
</local:ControlExample>

<local:ControlExample
<local:ControlExample x:Name="Example6"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
HeaderText="Hierarchical NavigationView"
XamlSource="NavigationView\NavigationViewSample9_xaml.txt">
HeaderText="Hierarchical NavigationView">
<local:ControlExample.Options>
<StackPanel>
<TextBlock Margin="0,12,0,0" Text="PanePosition:" />
Expand Down Expand Up @@ -401,7 +393,7 @@
</Grid>
</local:ControlExample>

<local:ControlExample
<local:ControlExample x:Name="Example7"
VerticalAlignment="Top"
HorizontalContentAlignment="Stretch"
HeaderText="API in action"
Expand Down Expand Up @@ -497,7 +489,7 @@
Content="Menu Item1"
Tag="SamplePage1">
<muxc:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="Play" />
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Play}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItemHeader Content="Actions" />
Expand All @@ -507,15 +499,15 @@
SelectsOnInvoked="True"
Tag="SamplePage2">
<muxc:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="Save" />
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Save}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem
x:Name="SamplePage3Item"
Content="Menu Item3"
Tag="SamplePage3">
<muxc:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="Refresh" />
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Refresh}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
</muxc:NavigationView.MenuItems>
Expand Down

0 comments on commit dd73828

Please sign in to comment.