PowerToys/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml

186 lines
8.2 KiB
Plaintext
Raw Normal View History

<Page
x:Class="Microsoft.PowerToys.Settings.UI.Views.KeyboardManagerPage"
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"
xmlns:viewmodels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<viewmodels:RemapKeysModel x:Key="dummyData"/>
<DataTemplate x:Name="KeysListViewTemplate" x:DataType="viewmodels:RemapKeysModel">
<Grid Height="56">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Border
Background="{ThemeResource SystemBaseLowColor}"
CornerRadius="4"
Grid.Column="0"
Padding="14,0,14,0"
Margin="0,0,0,0"
Height="36"
VerticalAlignment="Center"
HorizontalAlignment="Left">
<TextBlock FontWeight="SemiBold"
VerticalAlignment="Center"
TextAlignment="Center"
FontSize="12"
Text="{Binding From}">
</TextBlock>
</Border>
<FontIcon Glyph="&#xE72A;"
Grid.Column="1"
FontSize="14"
VerticalAlignment="Center" />
<Border Background="{ThemeResource SystemAccentColor}"
CornerRadius="4"
Grid.Column="2"
Padding="14,0,14,0"
Margin="20,0,0,0"
Height="36"
VerticalAlignment="Center"
HorizontalAlignment="Left">
<TextBlock FontWeight="SemiBold"
VerticalAlignment="Center"
TextAlignment="Center"
Foreground="White"
FontSize="12"
Text="{Binding To}">
</TextBlock>
</Border>
</Grid>
</DataTemplate>
</Page.Resources>
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="LayoutVisualStates">
<VisualState x:Name="WideLayout">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" />
<Setter Target="SidePanel.(Grid.Row)" Value="0" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="SmallLayout">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" />
<Setter Target="SidePanel.(Grid.Row)" Value="1" />
</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>
<StackPanel Orientation="Vertical">
<TextBlock x:Uid="KeyboardManager_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="KeyboardManager_EnableToggle"
IsOn="True"
Margin="{StaticResource SmallTopMargin}" />
<TextBlock x:Uid="KeyboardManager_ConfigHeader"
Style="{StaticResource SettingsGroupTitleStyle}"/>
<TextBlock x:Uid="KeyboardManager_ProfileDescription"
Margin="{StaticResource SmallTopMargin}"/>
<ComboBox SelectedIndex="1" MinWidth="160"
Margin="{StaticResource SmallTopMargin}">
<ComboBoxItem Content="Config-1"/>
<ComboBoxItem Content="Config-2"/>
<ComboBoxItem Content="Config-3"/>
</ComboBox>
<TextBlock x:Uid="KeyboardManager_RemapKeyboardHeader"
Style="{StaticResource SettingsGroupTitleStyle}"/>
<TextBlock Text="Description of the Remap Keyboard (subfeature)"
Margin="{StaticResource SmallTopMargin}"
TextWrapping="Wrap"/>
<Button x:Uid="KeyboardManager_RemapKeyboardButton"
Margin="{StaticResource SmallTopMargin}"
Style="{StaticResource ButtonRevealStyle}"/>
<ListView x:Name="RemapKeysList"
ItemsSource="{StaticResource dummyData}"
ItemTemplate="{StaticResource KeysListViewTemplate}"
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
BorderThickness="1"
Width="350"
MaxHeight="200"
Margin="{StaticResource MediumTopBottomMargin}"
HorizontalAlignment="Left"/>
<TextBlock x:Uid="KeyboardManager_RemapShortcutsHeader"
Style="{StaticResource SettingsGroupTitleStyle}"/>
<TextBlock Text="Description of the Remap Shortcuts (subfeature)"
TextWrapping="Wrap" Margin="{StaticResource SmallTopMargin}"/>
<Button x:Uid="KeyboardManager_RemapShortcutsButton"
Margin="{StaticResource SmallTopMargin}"
Style="{StaticResource ButtonRevealStyle}"/>
<ListView x:Name="RemapShortcutsList"
ItemsSource="{StaticResource dummyData}"
ItemTemplate="{StaticResource KeysListViewTemplate}"
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
BorderThickness="1"
CornerRadius="4"
Width="350"
MaxHeight="200"
Margin="{StaticResource MediumTopBottomMargin}"
HorizontalAlignment="Left"/>
</StackPanel>
<StackPanel x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}"
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>
</Page>