mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Settings: Add ScrollViewer to Command Palette page in PowerToys Settings (#43649)
This commit is contained in:
@@ -11,199 +11,201 @@
|
|||||||
AutomationProperties.LandmarkType="Main"
|
AutomationProperties.LandmarkType="Main"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid
|
<ScrollViewer AutomationProperties.AutomationId="PageScrollViewer">
|
||||||
MaxWidth="1000"
|
|
||||||
Padding="16,0,16,0"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="16"
|
|
||||||
RowSpacing="8">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<tkcontrols:OpacityMaskView Margin="-16,0,-16,0" HorizontalAlignment="Stretch">
|
|
||||||
<tkcontrols:OpacityMaskView.OpacityMask>
|
|
||||||
<Rectangle>
|
|
||||||
<Rectangle.Fill>
|
|
||||||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
||||||
<GradientStop Offset="0.50" Color="Black" />
|
|
||||||
<GradientStop Offset="0.75" Color="#80000000" />
|
|
||||||
<GradientStop Offset="0.95" Color="Transparent" />
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</Rectangle.Fill>
|
|
||||||
</Rectangle>
|
|
||||||
</tkcontrols:OpacityMaskView.OpacityMask>
|
|
||||||
<Grid Height="560">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Image
|
|
||||||
Grid.RowSpan="3"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Source="/Assets/Settings/Modules/CmdPal_Background.png"
|
|
||||||
Stretch="UniformToFill" />
|
|
||||||
<TextBlock
|
|
||||||
Margin="0,24,0,12"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
FontSize="36"
|
|
||||||
FontWeight="Bold"
|
|
||||||
Text="Command Palette">
|
|
||||||
<TextBlock.Foreground>
|
|
||||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
||||||
<GradientStop Offset="0.0" Color="#FFB9EBFF" />
|
|
||||||
<GradientStop Offset="0.49" Color="#FF86CBFF" />
|
|
||||||
<GradientStop Offset="1.0" Color="#FFA1E7FF" />
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</TextBlock.Foreground>
|
|
||||||
</TextBlock>
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="1"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Foreground="White"
|
|
||||||
TextAlignment="Center"
|
|
||||||
TextWrapping="Wrap">
|
|
||||||
<Run x:Uid="CmdPal_Description" />
|
|
||||||
<Hyperlink NavigateUri="">
|
|
||||||
<Run x:Uid="LearnMore_CmdPal.Text" Foreground="White" />
|
|
||||||
</Hyperlink>
|
|
||||||
</TextBlock>
|
|
||||||
<Image
|
|
||||||
Grid.Row="2"
|
|
||||||
Margin="0,16,0,0"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Source="/Assets/Settings/Modules/CmdPal_Hero.png"
|
|
||||||
Stretch="Uniform" />
|
|
||||||
</Grid>
|
|
||||||
</tkcontrols:OpacityMaskView>
|
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
MaxWidth="1000"
|
||||||
Margin="0,-12,0,24"
|
Padding="16,0,16,0"
|
||||||
ColumnSpacing="32"
|
VerticalAlignment="Top"
|
||||||
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="16"
|
||||||
RowSpacing="8">
|
RowSpacing="8">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<tkcontrols:OpacityMaskView Margin="-16,0,-16,0" HorizontalAlignment="Stretch">
|
||||||
<ColumnDefinition Width="*" />
|
<tkcontrols:OpacityMaskView.OpacityMask>
|
||||||
<ColumnDefinition Width="*" />
|
<Rectangle>
|
||||||
<ColumnDefinition Width="*" />
|
<Rectangle.Fill>
|
||||||
</Grid.ColumnDefinitions>
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
||||||
<FontIcon
|
<GradientStop Offset="0.50" Color="Black" />
|
||||||
HorizontalAlignment="Center"
|
<GradientStop Offset="0.75" Color="#80000000" />
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
<GradientStop Offset="0.95" Color="Transparent" />
|
||||||
Glyph="" />
|
</LinearGradientBrush>
|
||||||
<TextBlock
|
</Rectangle.Fill>
|
||||||
Grid.Row="1"
|
</Rectangle>
|
||||||
HorizontalAlignment="Center"
|
</tkcontrols:OpacityMaskView.OpacityMask>
|
||||||
TextAlignment="Center"
|
<Grid Height="560">
|
||||||
TextWrapping="Wrap">
|
<Grid.RowDefinitions>
|
||||||
<Run x:Uid="CmdPal_ExtensibleHeader" FontWeight="SemiBold" /> <LineBreak />
|
<RowDefinition Height="Auto" />
|
||||||
<Run
|
<RowDefinition Height="Auto" />
|
||||||
x:Uid="CmdPal_ExtensibleDescription"
|
<RowDefinition Height="*" />
|
||||||
FontSize="12"
|
</Grid.RowDefinitions>
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
<Image
|
||||||
</TextBlock>
|
Grid.RowSpan="3"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Source="/Assets/Settings/Modules/CmdPal_Background.png"
|
||||||
|
Stretch="UniformToFill" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,24,0,12"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
FontSize="36"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Text="Command Palette">
|
||||||
|
<TextBlock.Foreground>
|
||||||
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
||||||
|
<GradientStop Offset="0.0" Color="#FFB9EBFF" />
|
||||||
|
<GradientStop Offset="0.49" Color="#FF86CBFF" />
|
||||||
|
<GradientStop Offset="1.0" Color="#FFA1E7FF" />
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</TextBlock.Foreground>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Foreground="White"
|
||||||
|
TextAlignment="Center"
|
||||||
|
TextWrapping="Wrap">
|
||||||
|
<Run x:Uid="CmdPal_Description" />
|
||||||
|
<Hyperlink NavigateUri="">
|
||||||
|
<Run x:Uid="LearnMore_CmdPal.Text" Foreground="White" />
|
||||||
|
</Hyperlink>
|
||||||
|
</TextBlock>
|
||||||
|
<Image
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="0,16,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Source="/Assets/Settings/Modules/CmdPal_Hero.png"
|
||||||
|
Stretch="Uniform" />
|
||||||
|
</Grid>
|
||||||
|
</tkcontrols:OpacityMaskView>
|
||||||
|
|
||||||
<FontIcon
|
<Grid
|
||||||
Grid.Column="1"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Margin="0,-12,0,24"
|
||||||
HorizontalAlignment="Center"
|
ColumnSpacing="32"
|
||||||
TextAlignment="Center"
|
RowSpacing="8">
|
||||||
TextWrapping="Wrap">
|
<Grid.RowDefinitions>
|
||||||
<Run x:Uid="CmdPal_FastHeader" FontWeight="SemiBold" /> <LineBreak />
|
<RowDefinition Height="Auto" />
|
||||||
<Run
|
<RowDefinition Height="Auto" />
|
||||||
x:Uid="CmdPal_FastDescription"
|
</Grid.RowDefinitions>
|
||||||
FontSize="12"
|
<Grid.ColumnDefinitions>
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
<ColumnDefinition Width="*" />
|
||||||
</TextBlock>
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<FontIcon
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
Glyph="" />
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
TextAlignment="Center"
|
||||||
|
TextWrapping="Wrap">
|
||||||
|
<Run x:Uid="CmdPal_ExtensibleHeader" FontWeight="SemiBold" /> <LineBreak />
|
||||||
|
<Run
|
||||||
|
x:Uid="CmdPal_ExtensibleDescription"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
<FontIcon
|
<FontIcon
|
||||||
Grid.Column="2"
|
Grid.Column="1"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="2"
|
Grid.Column="1"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
TextWrapping="Wrap">
|
TextWrapping="Wrap">
|
||||||
<Run x:Uid="CmdPal_ModernHeader" FontWeight="SemiBold" /> <LineBreak />
|
<Run x:Uid="CmdPal_FastHeader" FontWeight="SemiBold" /> <LineBreak />
|
||||||
<Run
|
<Run
|
||||||
x:Uid="CmdPal_ModernDescription"
|
x:Uid="CmdPal_FastDescription"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Grid>
|
|
||||||
<StackPanel
|
<FontIcon
|
||||||
Grid.Row="2"
|
Grid.Column="2"
|
||||||
Margin="0,8,0,0"
|
HorizontalAlignment="Center"
|
||||||
Orientation="Vertical"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Spacing="{StaticResource SettingsCardSpacing}">
|
Glyph="" />
|
||||||
<controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}">
|
<TextBlock
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
TextAlignment="Center"
|
||||||
|
TextWrapping="Wrap">
|
||||||
|
<Run x:Uid="CmdPal_ModernHeader" FontWeight="SemiBold" /> <LineBreak />
|
||||||
|
<Run
|
||||||
|
x:Uid="CmdPal_ModernDescription"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
<StackPanel
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="0,8,0,0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
|
<controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}">
|
||||||
|
<tkcontrols:SettingsCard
|
||||||
|
Name="CmdPalEnableCmdPal"
|
||||||
|
x:Uid="CmdPal_Enable_CmdPal"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/CmdPal.png}">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
||||||
|
</tkcontrols:SettingsCard>
|
||||||
|
</controls:GPOInfoControl>
|
||||||
<tkcontrols:SettingsCard
|
<tkcontrols:SettingsCard
|
||||||
Name="CmdPalEnableCmdPal"
|
x:Uid="CmdPal_Launch"
|
||||||
x:Uid="CmdPal_Enable_CmdPal"
|
Grid.Row="3"
|
||||||
HorizontalAlignment="Stretch"
|
ActionIcon="{ui:FontIcon Glyph=}"
|
||||||
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/CmdPal.png}">
|
Click="LaunchCard_Click"
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
Header="Launch Command Palette"
|
||||||
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||||
|
IsClickEnabled="True"
|
||||||
|
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||||
|
<ItemsControl
|
||||||
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
|
IsTabStop="False"
|
||||||
|
ItemsSource="{x:Bind Path=ViewModel.Hotkey.GetKeysList(), Mode=OneWay}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="4" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<controls:KeyVisual
|
||||||
|
Padding="8,8,8,8"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
|
Content="{Binding}"
|
||||||
|
Style="{StaticResource AccentKeyVisualStyle}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:GPOInfoControl>
|
<tkcontrols:SettingsCard
|
||||||
<tkcontrols:SettingsCard
|
x:Uid="CmdPal_Settings"
|
||||||
x:Uid="CmdPal_Launch"
|
Grid.Row="4"
|
||||||
Grid.Row="3"
|
ActionIcon="{ui:FontIcon Glyph=}"
|
||||||
ActionIcon="{ui:FontIcon Glyph=}"
|
Click="SettingsCard_Click"
|
||||||
Click="LaunchCard_Click"
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||||
Header="Launch Command Palette"
|
IsClickEnabled="True"
|
||||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}" />
|
||||||
IsClickEnabled="True"
|
</StackPanel>
|
||||||
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
</Grid>
|
||||||
<ItemsControl
|
</ScrollViewer>
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
|
||||||
IsTabStop="False"
|
|
||||||
ItemsSource="{x:Bind Path=ViewModel.Hotkey.GetKeysList(), Mode=OneWay}">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="4" />
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<controls:KeyVisual
|
|
||||||
Padding="8,8,8,8"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
|
||||||
Content="{Binding}"
|
|
||||||
Style="{StaticResource AccentKeyVisualStyle}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
</tkcontrols:SettingsCard>
|
|
||||||
<tkcontrols:SettingsCard
|
|
||||||
x:Uid="CmdPal_Settings"
|
|
||||||
Grid.Row="4"
|
|
||||||
ActionIcon="{ui:FontIcon Glyph=}"
|
|
||||||
Click="SettingsCard_Click"
|
|
||||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
||||||
IsClickEnabled="True"
|
|
||||||
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}" />
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</local:NavigablePage>
|
</local:NavigablePage>
|
||||||
|
|||||||
Reference in New Issue
Block a user