2020-03-11 10:43:32 -07:00
|
|
|
<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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:behaviors="using:Microsoft.PowerToys.Settings.UI.Behaviors"
|
|
|
|
|
xmlns:winui="using:Microsoft.UI.Xaml.Controls"
|
|
|
|
|
xmlns:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers"
|
|
|
|
|
xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views"
|
|
|
|
|
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
|
|
|
|
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
|
|
|
|
|
<i:Interaction.Behaviors>
|
|
|
|
|
<ic:EventTriggerBehavior EventName="Loaded">
|
|
|
|
|
<ic:InvokeCommandAction Command="{x:Bind ViewModel.LoadedCommand}" />
|
|
|
|
|
</ic:EventTriggerBehavior>
|
|
|
|
|
</i:Interaction.Behaviors>
|
|
|
|
|
|
2020-03-27 16:58:53 +01:00
|
|
|
<Grid>
|
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup x:Name="LayoutVisualStates">
|
|
|
|
|
<VisualState x:Name="LargeLayout">
|
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="1100" />
|
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Target="SidePanel.(Grid.Column)" Value="1" />
|
|
|
|
|
<Setter Target="SidePanel.(Grid.Row)" Value="0" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="WideLayout">
|
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="480" />
|
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Target="SidePanel.(Grid.Column)" Value="0" />
|
|
|
|
|
<Setter Target="SidePanel.(Grid.Row)" Value="1" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
|
2020-03-11 10:43:32 -07:00
|
|
|
<winui:NavigationView
|
|
|
|
|
x:Name="navigationView"
|
|
|
|
|
IsBackButtonVisible="Collapsed"
|
|
|
|
|
IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}"
|
|
|
|
|
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}"
|
|
|
|
|
IsSettingsVisible="False"
|
|
|
|
|
IsPaneToggleButtonVisible="False"
|
|
|
|
|
PaneDisplayMode="Left"
|
|
|
|
|
Background="{ThemeResource SystemControlBackgroundAltHighBrush}">
|
2020-03-27 16:58:53 +01:00
|
|
|
<!-- <winui:NavigationView.PaneHeader>
|
|
|
|
|
|
2020-03-11 10:43:32 -07:00
|
|
|
TODO:
|
|
|
|
|
PowerToys needs to be string
|
|
|
|
|
Think maybe about svg logo here
|
|
|
|
|
Margin should be style
|
2020-03-27 16:58:53 +01:00
|
|
|
|
|
|
|
|
<TextBlock Margin="12, 24, 0, 6" Style="{StaticResource SubheaderTextBlockStyle}" FontWeight="Bold">PowerToys</TextBlock>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</winui:NavigationView.PaneHeader> -->
|
2020-03-11 10:43:32 -07:00
|
|
|
<winui:NavigationView.MenuItems>
|
|
|
|
|
<!--
|
|
|
|
|
TODO WTS: Change the symbols for each item as appropriate for your app
|
|
|
|
|
More on Segoe UI Symbol icons: https://docs.microsoft.com/windows/uwp/style/segoe-ui-symbol-font
|
|
|
|
|
Or to use an IconElement instead of a Symbol see https://github.com/Microsoft/WindowsTemplateStudio/blob/master/docs/projectTypes/navigationpane.md
|
|
|
|
|
Edit String/en-US/Resources.resw: Add a menu item title for each page
|
|
|
|
|
-->
|
2020-03-12 07:25:24 +01:00
|
|
|
<winui:NavigationViewItem x:Uid="Shell_General" helpers:NavHelper.NavigateTo="views:GeneralPage">
|
|
|
|
|
<winui:NavigationViewItem.Icon>
|
|
|
|
|
<FontIcon Glyph=""/>
|
|
|
|
|
</winui:NavigationViewItem.Icon>
|
|
|
|
|
</winui:NavigationViewItem>
|
2020-03-27 16:58:53 +01:00
|
|
|
|
|
|
|
|
<!-- TO DO: Update icon -->
|
|
|
|
|
<winui:NavigationViewItem x:Uid="Shell_PowerRename" helpers:NavHelper.NavigateTo="views:PowerRenamePage">
|
|
|
|
|
<winui:NavigationViewItem.Icon>
|
|
|
|
|
<FontIcon Glyph=""/>
|
|
|
|
|
</winui:NavigationViewItem.Icon>
|
|
|
|
|
</winui:NavigationViewItem>
|
|
|
|
|
|
|
|
|
|
<!-- TO DO: Update icon -->
|
|
|
|
|
<winui:NavigationViewItem x:Uid="Shell_ShortcutGuide" helpers:NavHelper.NavigateTo="views:ShortcutGuidePage">
|
|
|
|
|
<winui:NavigationViewItem.Icon>
|
|
|
|
|
<FontIcon Glyph=""/>
|
|
|
|
|
</winui:NavigationViewItem.Icon>
|
|
|
|
|
</winui:NavigationViewItem>
|
|
|
|
|
|
|
|
|
|
<!-- TO DO: Update icon -->
|
|
|
|
|
<winui:NavigationViewItem x:Uid="Shell_PowerLauncher" helpers:NavHelper.NavigateTo="views:PowerLauncherPage">
|
|
|
|
|
<winui:NavigationViewItem.Icon>
|
|
|
|
|
<FontIcon Glyph=""/>
|
|
|
|
|
</winui:NavigationViewItem.Icon>
|
|
|
|
|
</winui:NavigationViewItem>
|
2020-03-11 10:43:32 -07:00
|
|
|
</winui:NavigationView.MenuItems>
|
|
|
|
|
<i:Interaction.Behaviors>
|
|
|
|
|
<behaviors:NavigationViewHeaderBehavior
|
|
|
|
|
DefaultHeader="{x:Bind ViewModel.Selected.Content, Mode=OneWay}">
|
|
|
|
|
<behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<!-- TODO: Style clean up-->
|
|
|
|
|
<Grid Margin="0, 24, 0, 6">
|
|
|
|
|
<TextBlock
|
|
|
|
|
Text="{Binding}"
|
|
|
|
|
FontWeight="Bold"
|
|
|
|
|
Style="{ThemeResource TitleTextBlockStyle}"
|
|
|
|
|
Margin="{StaticResource SmallLeftRightMargin}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
|
|
|
|
|
</behaviors:NavigationViewHeaderBehavior>
|
|
|
|
|
<ic:EventTriggerBehavior EventName="ItemInvoked">
|
|
|
|
|
<ic:InvokeCommandAction Command="{x:Bind ViewModel.ItemInvokedCommand}" />
|
|
|
|
|
</ic:EventTriggerBehavior>
|
|
|
|
|
</i:Interaction.Behaviors>
|
2020-03-27 16:58:53 +01:00
|
|
|
<ScrollViewer Grid.Column="0">
|
|
|
|
|
<Grid RowSpacing="32"
|
|
|
|
|
Margin="{StaticResource MediumLeftRightBottomMargin}">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Frame x:Name="shellFrame" />
|
|
|
|
|
|
|
|
|
|
<StackPanel x:Name="SidePanel"
|
|
|
|
|
Orientation="Vertical"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
Width="240"
|
|
|
|
|
Grid.Column="1">
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="About this feature"
|
|
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"
|
|
|
|
|
Margin="{StaticResource XSmallBottomMargin}"/>
|
|
|
|
|
|
|
|
|
|
<HyperlinkButton Content="Module overview"/>
|
|
|
|
|
<HyperlinkButton Content="Give feedback"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Contributors"
|
|
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
|
|
|
|
|
|
|
|
|
<HyperlinkButton Content="Contributor name"/>
|
|
|
|
|
<HyperlinkButton Content="Contributor name"/>
|
|
|
|
|
<HyperlinkButton Content="Contributor name"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</ScrollViewer>
|
2020-03-11 10:43:32 -07:00
|
|
|
</winui:NavigationView>
|
2020-03-27 16:58:53 +01:00
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|