Files
PowerToys/src/settings-ui/Settings.UI/Views/ShellPage.xaml

159 lines
7.7 KiB
XML

<UserControl
x:Class="Microsoft.PowerToys.Settings.UI.Views.ShellPage"
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:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers"
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI"
xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views"
HighContrastAdjustment="None"
mc:Ignorable="d">
<!--
TODO(stefan): Bring back Should be available in v1.1
BackdropMaterial.ApplyToRootOrPageBackground="True"
-->
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="Loaded">
<ic:InvokeCommandAction Command="{x:Bind ViewModel.LoadedCommand}" />
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
<Grid
x:Name="RootGrid"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<NavigationView
x:Name="navigationView"
CompactModeThresholdWidth="1007"
ExpandedModeThresholdWidth="1007"
IsBackButtonVisible="Collapsed"
IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}"
IsSettingsVisible="False"
IsTitleBarAutoPaddingEnabled="False"
PaneClosed="NavigationView_PaneClosed"
PaneOpened="NavigationView_PaneOpened"
SelectionChanged="NavigationView_SelectionChanged"
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}">
<NavigationView.Resources>
<SolidColorBrush
x:Key="NavigationViewContentBackground"
Color="Transparent" />
<SolidColorBrush
x:Key="NavigationViewContentGridBorderBrush"
Color="Transparent" />
</NavigationView.Resources>
<NavigationView.MenuItems>
<NavigationViewItem
x:Uid="Shell_General"
helpers:NavHelper.NavigateTo="views:GeneralPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsSettings.png}" />
<NavigationViewItem
x:Uid="Shell_AlwaysOnTop"
helpers:NavHelper.NavigateTo="views:AlwaysOnTopPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsAlwaysOnTop.png}" />
<NavigationViewItem
x:Uid="Shell_Awake"
helpers:NavHelper.NavigateTo="views:AwakePage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsAwake.png}" />
<NavigationViewItem
x:Uid="Shell_ColorPicker"
helpers:NavHelper.NavigateTo="views:ColorPickerPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsColorPicker.png}" />
<NavigationViewItem
x:Uid="Shell_FancyZones"
helpers:NavHelper.NavigateTo="views:FancyZonesPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsFancyZones.png}" />
<NavigationViewItem
x:Uid="Shell_FileLocksmith"
helpers:NavHelper.NavigateTo="views:FileLocksmithPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsFileLocksmith.png}" />
<NavigationViewItem
x:Uid="Shell_PowerPreview"
helpers:NavHelper.NavigateTo="views:PowerPreviewPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsFileExplorerPreview.png}" />
<NavigationViewItem
x:Uid="Shell_Hosts"
helpers:NavHelper.NavigateTo="views:HostsPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsHosts.png}" />
<NavigationViewItem
x:Uid="Shell_ImageResizer"
helpers:NavHelper.NavigateTo="views:ImageResizerPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsImageResizer.png}" />
<NavigationViewItem
x:Uid="Shell_KeyboardManager"
helpers:NavHelper.NavigateTo="views:KeyboardManagerPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsKeyboardManager.png}" />
<NavigationViewItem
x:Uid="Shell_MouseUtilities"
helpers:NavHelper.NavigateTo="views:MouseUtilsPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsMouseUtils.png}" />
<NavigationViewItem
x:Uid="Shell_PowerRename"
helpers:NavHelper.NavigateTo="views:PowerRenamePage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerRename.png}" />
<NavigationViewItem
x:Uid="Shell_PowerLauncher"
helpers:NavHelper.NavigateTo="views:PowerLauncherPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerToysRun.png}" />
<NavigationViewItem
x:Uid="Shell_QuickAccent"
helpers:NavHelper.NavigateTo="views:PowerAccentPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerAccent.png}" />
<NavigationViewItem
x:Uid="Shell_MeasureTool"
helpers:NavHelper.NavigateTo="views:MeasureToolPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsScreenRuler.png}" />
<NavigationViewItem
x:Uid="Shell_ShortcutGuide"
helpers:NavHelper.NavigateTo="views:ShortcutGuidePage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsShortcutGuide.png}" />
<NavigationViewItem
x:Uid="Shell_TextExtractor"
helpers:NavHelper.NavigateTo="views:PowerOcrPage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerOcr.png}" />
<NavigationViewItem
x:Uid="Shell_VideoConference"
helpers:NavHelper.NavigateTo="views:VideoConferencePage"
Icon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsVideoConferenceMute.png}"
IsEnabled="{x:Bind ViewModel.IsVideoConferenceBuild, Mode=OneWay}" />
</NavigationView.MenuItems>
<NavigationView.PaneFooter>
<StackPanel Orientation="Vertical">
<NavigationViewItem
x:Uid="OOBE_NavViewItem"
Icon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xF133;}"
Tapped="OOBEItem_Tapped" />
<NavigationViewItem
x:Uid="Feedback_NavViewItem"
Icon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xED15;}"
Tapped="FeedbackItem_Tapped" />
</StackPanel>
</NavigationView.PaneFooter>
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="ItemInvoked">
<ic:InvokeCommandAction Command="{x:Bind ViewModel.ItemInvokedCommand}" />
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
<Frame x:Name="shellFrame" />
</NavigationView>
</Grid>
</UserControl>