2020-03-27 23:58:53 +08:00
|
|
|
<Page
|
|
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Views.ShortcutGuidePage"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Views"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2020-07-18 02:01:46 +08:00
|
|
|
xmlns:viewModel="using:Microsoft.PowerToys.Settings.UI.ViewModels"
|
|
|
|
xmlns:CustomControls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
2020-05-29 21:11:52 +08:00
|
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
2020-03-27 23:58:53 +08:00
|
|
|
mc:Ignorable="d"
|
2020-10-29 02:10:08 +08:00
|
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
|
|
|
AutomationProperties.LandmarkType="Main">
|
2020-03-27 23:58:53 +08:00
|
|
|
|
2020-05-29 21:11:52 +08:00
|
|
|
<Page.Resources>
|
|
|
|
<converters:StringFormatConverter x:Key="StringFormatConverter"/>
|
|
|
|
</Page.Resources>
|
2020-08-08 03:00:48 +08:00
|
|
|
|
|
|
|
<Grid RowSpacing="{StaticResource DefaultRowSpacing}">
|
2020-03-31 20:32:22 +08:00
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
<VisualStateGroup x:Name="LayoutVisualStates">
|
|
|
|
<VisualState x:Name="WideLayout">
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="SmallLayout">
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
|
2020-08-08 03:00:48 +08:00
|
|
|
<AdaptiveTrigger MinWindowWidth="0" />
|
2020-03-31 20:32:22 +08:00
|
|
|
</VisualState.StateTriggers>
|
|
|
|
<VisualState.Setters>
|
2020-07-25 03:02:56 +08:00
|
|
|
<Setter Target="SidePanel.(Grid.Column)" Value="0"/>
|
2020-08-08 03:00:48 +08:00
|
|
|
<Setter Target="SidePanel.Width" Value="Auto"/>
|
|
|
|
<Setter Target="ShortcutGuideView.(Grid.Row)" Value="1" />
|
2021-01-06 00:24:14 +08:00
|
|
|
<Setter Target="ShortcutGuideView.Margin" Value="0" />
|
2020-07-25 03:02:56 +08:00
|
|
|
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
|
|
|
|
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
|
|
|
|
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
|
|
|
|
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
|
2020-03-31 20:32:22 +08:00
|
|
|
</VisualState.Setters>
|
|
|
|
</VisualState>
|
|
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
2021-01-06 00:24:14 +08:00
|
|
|
<StackPanel Orientation="Vertical"
|
|
|
|
x:Name="ShortcutGuideView"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="0,0,48,0"
|
|
|
|
MaxWidth="{StaticResource MaxContentWidth}">
|
2020-04-20 21:03:26 +08:00
|
|
|
<ToggleSwitch x:Uid="ShortcutGuide_Enable"
|
2020-07-25 03:02:56 +08:00
|
|
|
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"/>
|
|
|
|
|
|
|
|
<TextBlock x:Uid="ShortcutGuide_Appearance_Behavior"
|
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"
|
|
|
|
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
|
2020-03-27 23:58:53 +08:00
|
|
|
|
2020-09-09 06:28:57 +08:00
|
|
|
<muxc:NumberBox x:Uid="ShortcutGuide_PressTime"
|
|
|
|
Minimum="100"
|
2020-05-25 23:58:29 +08:00
|
|
|
SpinButtonPlacementMode="Compact"
|
2020-03-27 23:58:53 +08:00
|
|
|
HorizontalAlignment="Left"
|
2020-09-09 06:28:57 +08:00
|
|
|
Margin="{StaticResource SmallTopMargin}"
|
2020-10-23 05:37:10 +08:00
|
|
|
MinWidth="240"
|
2020-07-18 02:01:46 +08:00
|
|
|
Value="{x:Bind Mode=TwoWay, Path=ViewModel.PressTime}"
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
|
|
|
SmallChange="50"
|
2020-09-09 06:28:57 +08:00
|
|
|
LargeChange="100"/>
|
2020-03-27 23:58:53 +08:00
|
|
|
|
2020-05-29 21:11:52 +08:00
|
|
|
<StackPanel Orientation="Horizontal" Margin="{StaticResource MediumTopMargin}" Spacing="12">
|
|
|
|
<Slider x:Uid="ShortcutGuide_OverlayOpacity"
|
2020-03-27 23:58:53 +08:00
|
|
|
Minimum="0"
|
|
|
|
Maximum="100"
|
2020-05-29 20:37:09 +08:00
|
|
|
Width="240"
|
2020-07-18 02:01:46 +08:00
|
|
|
Value="{x:Bind Mode=TwoWay, Path=ViewModel.OverlayOpacity}"
|
2020-05-29 21:11:52 +08:00
|
|
|
IsThumbToolTipEnabled="False"
|
2020-03-27 23:58:53 +08:00
|
|
|
HorizontalAlignment="Left"
|
2020-07-18 02:01:46 +08:00
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
|
2020-07-25 03:02:56 +08:00
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
Text="{x:Bind Mode=OneWay, Path=ViewModel.OverlayOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
FontSize="16"
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
Margin="0,16,0,0"
|
|
|
|
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
|
2020-05-29 21:11:52 +08:00
|
|
|
</StackPanel>
|
2020-04-20 21:03:26 +08:00
|
|
|
|
2020-08-25 01:48:45 +08:00
|
|
|
<!-- We cannot navigate to all the radio buttons using the arrow keys because of an XYNavigation issue in the RadioButtons control.
|
|
|
|
The screen reader does not read the heading when we tab into a radio button, even though the LabeledBy automation property is set.
|
|
|
|
Link to the issue in the winui repository - https://github.com/microsoft/microsoft-ui-xaml/issues/3156 -->
|
|
|
|
<TextBlock Name="ShortcutGuide_Theme"
|
2020-10-25 21:37:43 +08:00
|
|
|
x:Uid="ColorModeHeader"
|
2020-07-25 03:02:56 +08:00
|
|
|
Margin="{StaticResource SmallTopMargin}"
|
|
|
|
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
|
2020-07-18 02:01:46 +08:00
|
|
|
<muxc:RadioButtons IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
|
|
|
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}"
|
2020-09-09 06:28:57 +08:00
|
|
|
Margin="{StaticResource XXSmallTopMargin}"
|
2020-08-25 01:48:45 +08:00
|
|
|
AutomationProperties.LabeledBy="{Binding ElementName=ShortcutGuide_Theme}">
|
2020-10-25 21:37:43 +08:00
|
|
|
<RadioButton x:Uid="Radio_Theme_Dark" />
|
|
|
|
<RadioButton x:Uid="Radio_Theme_Light" />
|
|
|
|
<RadioButton x:Uid="Radio_Theme_Default"/>
|
2020-03-27 23:58:53 +08:00
|
|
|
</muxc:RadioButtons>
|
2021-03-01 21:56:30 +08:00
|
|
|
<HyperlinkButton Click="OpenColorsSettings_Click"
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
2020-11-05 16:04:26 +08:00
|
|
|
<TextBlock x:Uid="Windows_Color_Settings" />
|
|
|
|
</HyperlinkButton>
|
2021-04-02 22:29:48 +08:00
|
|
|
|
|
|
|
<TextBlock x:Uid="ShortcutGuide_DisabledApps"
|
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"
|
|
|
|
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
|
|
|
|
|
|
|
|
<TextBox x:Uid="ShortcutGuide_DisabledApps_TextBoxControl"
|
|
|
|
Margin="{StaticResource SmallTopMargin}"
|
|
|
|
Text="{x:Bind Mode=TwoWay, Path=ViewModel.DisabledApps}"
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility ="Visible"
|
|
|
|
ScrollViewer.VerticalScrollMode="Enabled"
|
|
|
|
ScrollViewer.IsVerticalRailEnabled="True"
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
AcceptsReturn="True"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
MinWidth="240"
|
|
|
|
MinHeight="160" />
|
2020-03-27 23:58:53 +08:00
|
|
|
</StackPanel>
|
2020-03-31 20:32:22 +08:00
|
|
|
|
2020-07-25 03:02:56 +08:00
|
|
|
<RelativePanel x:Name="SidePanel"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Width="{StaticResource SidePanelWidth}"
|
|
|
|
Grid.Column="1">
|
|
|
|
<StackPanel x:Name="DescriptionPanel">
|
|
|
|
<TextBlock x:Uid="About_ShortcutGuide"
|
|
|
|
x:Name="AboutTitle"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"
|
|
|
|
Margin="{StaticResource XSmallBottomMargin}"/>
|
|
|
|
<TextBlock x:Uid="ShortcutGuide_Description"
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
Grid.Row="1" />
|
|
|
|
</StackPanel>
|
2020-04-20 21:03:26 +08:00
|
|
|
|
2020-07-25 03:02:56 +08:00
|
|
|
<Border x:Name="AboutImage"
|
|
|
|
CornerRadius="4"
|
|
|
|
Grid.Row="2"
|
|
|
|
MaxWidth="240"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="{StaticResource SmallTopBottomMargin}"
|
|
|
|
RelativePanel.Below="DescriptionPanel">
|
2021-01-05 02:51:05 +08:00
|
|
|
<HyperlinkButton x:Uid="ShortcutGuide_ImageHyperlinkToDocs">
|
|
|
|
<Image x:Uid="Shortcut_Guide_Image" Source="ms-appx:///Assets/Modules/ShortcutGuide.png" />
|
|
|
|
</HyperlinkButton>
|
2020-07-25 03:02:56 +08:00
|
|
|
</Border>
|
2020-05-06 04:03:48 +08:00
|
|
|
|
2020-07-25 03:02:56 +08:00
|
|
|
<StackPanel x:Name="LinksPanel"
|
2020-08-08 03:00:48 +08:00
|
|
|
Margin="0,1,0,0"
|
2020-07-25 03:02:56 +08:00
|
|
|
RelativePanel.Below="AboutImage"
|
|
|
|
Orientation="Vertical" >
|
2021-01-05 02:51:05 +08:00
|
|
|
<HyperlinkButton x:Uid="ShortcutGuide_ImageHyperlinkToDocs">
|
2020-07-25 03:02:56 +08:00
|
|
|
<TextBlock x:Uid="Module_overview" />
|
|
|
|
</HyperlinkButton>
|
2020-08-07 01:09:50 +08:00
|
|
|
<HyperlinkButton NavigateUri="https://aka.ms/powerToysGiveFeedback">
|
2020-07-25 03:02:56 +08:00
|
|
|
<TextBlock x:Uid="Give_Feedback" />
|
|
|
|
</HyperlinkButton>
|
|
|
|
</StackPanel>
|
|
|
|
</RelativePanel>
|
2020-03-27 23:58:53 +08:00
|
|
|
</Grid>
|
|
|
|
</Page>
|