2020-04-09 04:53:09 +08:00
|
|
|
<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"
|
2020-04-18 09:06:36 +08:00
|
|
|
xmlns:viewModel="using:Microsoft.PowerToys.Settings.UI.ViewModels"
|
|
|
|
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
|
2020-04-09 04:53:09 +08:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
|
|
|
|
|
|
<Page.Resources>
|
2020-04-18 09:06:36 +08:00
|
|
|
<viewModel:RemapKeysModel x:Key="dummyData"/>
|
|
|
|
<viewModel:KeyboardManagerViewModel x:Key="eventViewModel"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
2020-04-18 09:06:36 +08:00
|
|
|
<DataTemplate x:Name="KeysListViewTemplate" x:DataType="viewModel:RemapKeysModel">
|
2020-04-11 03:11:21 +08:00
|
|
|
<Grid Height="56">
|
2020-04-09 04:53:09 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
2020-04-11 03:11:21 +08:00
|
|
|
<ColumnDefinition Width="80"/>
|
|
|
|
<ColumnDefinition Width="80"/>
|
|
|
|
<ColumnDefinition Width="120"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
2020-04-11 03:11:21 +08:00
|
|
|
<Border
|
|
|
|
Background="{ThemeResource SystemBaseLowColor}"
|
2020-04-09 04:53:09 +08:00
|
|
|
CornerRadius="4"
|
|
|
|
Grid.Column="0"
|
2020-04-11 03:11:21 +08:00
|
|
|
Padding="14,0,14,0"
|
|
|
|
Margin="0,0,0,0"
|
|
|
|
Height="36"
|
|
|
|
VerticalAlignment="Center"
|
2020-04-09 04:53:09 +08:00
|
|
|
HorizontalAlignment="Left">
|
2020-04-11 03:11:21 +08:00
|
|
|
<TextBlock FontWeight="SemiBold"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
TextAlignment="Center"
|
|
|
|
FontSize="12"
|
2020-04-09 04:53:09 +08:00
|
|
|
Text="{Binding From}">
|
|
|
|
</TextBlock>
|
|
|
|
</Border>
|
2020-04-11 03:11:21 +08:00
|
|
|
<FontIcon Glyph=""
|
|
|
|
Grid.Column="1"
|
|
|
|
FontSize="14"
|
|
|
|
VerticalAlignment="Center" />
|
2020-04-18 09:06:36 +08:00
|
|
|
|
2020-04-11 03:11:21 +08:00
|
|
|
<Border Background="{ThemeResource SystemAccentColor}"
|
2020-04-09 04:53:09 +08:00
|
|
|
CornerRadius="4"
|
2020-04-11 03:11:21 +08:00
|
|
|
Grid.Column="2"
|
|
|
|
Padding="14,0,14,0"
|
|
|
|
Margin="20,0,0,0"
|
|
|
|
Height="36"
|
|
|
|
VerticalAlignment="Center"
|
2020-04-09 04:53:09 +08:00
|
|
|
HorizontalAlignment="Left">
|
2020-04-11 03:11:21 +08:00
|
|
|
<TextBlock FontWeight="SemiBold"
|
2020-04-09 04:53:09 +08:00
|
|
|
VerticalAlignment="Center"
|
|
|
|
TextAlignment="Center"
|
2020-04-11 03:11:21 +08:00
|
|
|
Foreground="White"
|
|
|
|
FontSize="12"
|
2020-04-09 04:53:09 +08:00
|
|
|
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"
|
2020-04-11 03:11:21 +08:00
|
|
|
TextWrapping="Wrap"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<ToggleSwitch x:Uid="KeyboardManager_EnableToggle"
|
|
|
|
IsOn="True"
|
|
|
|
Margin="{StaticResource SmallTopMargin}" />
|
|
|
|
|
2020-04-18 09:06:36 +08:00
|
|
|
<!--<TextBlock x:Uid="KeyboardManager_ConfigHeader"
|
2020-04-11 03:11:21 +08:00
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
|
|
|
|
|
|
|
<TextBlock x:Uid="KeyboardManager_ProfileDescription"
|
2020-04-09 04:53:09 +08:00
|
|
|
Margin="{StaticResource SmallTopMargin}"/>
|
2020-04-11 03:11:21 +08:00
|
|
|
|
|
|
|
<ComboBox SelectedIndex="1" MinWidth="160"
|
|
|
|
Margin="{StaticResource SmallTopMargin}">
|
2020-04-18 09:06:36 +08:00
|
|
|
<ComboBoxItem Content="Config-1"/>
|
|
|
|
<ComboBoxItem Content="Config-2"/>
|
|
|
|
<ComboBoxItem Content="Config-3"/>
|
|
|
|
</ComboBox>-->
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<TextBlock x:Uid="KeyboardManager_RemapKeyboardHeader"
|
2020-04-11 03:11:21 +08:00
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
|
|
|
|
|
|
|
<TextBlock Text="Description of the Remap Keyboard (subfeature)"
|
|
|
|
Margin="{StaticResource SmallTopMargin}"
|
|
|
|
TextWrapping="Wrap"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<Button x:Uid="KeyboardManager_RemapKeyboardButton"
|
|
|
|
Margin="{StaticResource SmallTopMargin}"
|
2020-04-15 00:24:11 +08:00
|
|
|
Style="{StaticResource ButtonRevealStyle}"
|
|
|
|
Command="{Binding Path=RemapKeyboardCommand}"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<ListView x:Name="RemapKeysList"
|
2020-04-18 09:06:36 +08:00
|
|
|
extensions:ListViewExtensions.AlternateColor="{ThemeResource SystemControlBackgroundListLowBrush}"
|
2020-04-09 04:53:09 +08:00
|
|
|
ItemsSource="{StaticResource dummyData}"
|
|
|
|
ItemTemplate="{StaticResource KeysListViewTemplate}"
|
2020-04-11 03:11:21 +08:00
|
|
|
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
|
2020-04-09 04:53:09 +08:00
|
|
|
BorderThickness="1"
|
2020-04-11 03:11:21 +08:00
|
|
|
Width="350"
|
|
|
|
MaxHeight="200"
|
|
|
|
Margin="{StaticResource MediumTopBottomMargin}"
|
2020-04-18 09:06:36 +08:00
|
|
|
HorizontalAlignment="Left"
|
|
|
|
SelectionMode="None"
|
|
|
|
IsSwipeEnabled="False"/>
|
2020-04-11 03:11:21 +08:00
|
|
|
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<TextBlock x:Uid="KeyboardManager_RemapShortcutsHeader"
|
2020-04-11 03:11:21 +08:00
|
|
|
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
|
|
|
|
|
|
|
<TextBlock Text="Description of the Remap Shortcuts (subfeature)"
|
|
|
|
TextWrapping="Wrap" Margin="{StaticResource SmallTopMargin}"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<Button x:Uid="KeyboardManager_RemapShortcutsButton"
|
|
|
|
Margin="{StaticResource SmallTopMargin}"
|
2020-04-15 00:24:11 +08:00
|
|
|
Style="{StaticResource ButtonRevealStyle}"
|
|
|
|
Command="{Binding Path=EditShortcutCommand}"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
2020-04-18 09:06:36 +08:00
|
|
|
<ListView x:Name="RemapShortcutsList"
|
|
|
|
extensions:ListViewExtensions.AlternateColor="{ThemeResource SystemControlBackgroundListLowBrush}"
|
2020-04-09 04:53:09 +08:00
|
|
|
ItemsSource="{StaticResource dummyData}"
|
|
|
|
ItemTemplate="{StaticResource KeysListViewTemplate}"
|
2020-04-11 03:11:21 +08:00
|
|
|
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
|
2020-04-09 04:53:09 +08:00
|
|
|
BorderThickness="1"
|
|
|
|
CornerRadius="4"
|
2020-04-11 03:11:21 +08:00
|
|
|
Width="350"
|
|
|
|
MaxHeight="200"
|
|
|
|
Margin="{StaticResource MediumTopBottomMargin}"
|
2020-04-18 09:06:36 +08:00
|
|
|
HorizontalAlignment="Left"
|
|
|
|
SelectionMode="None"
|
|
|
|
IsSwipeEnabled="False"/>
|
2020-04-11 03:11:21 +08:00
|
|
|
|
|
|
|
|
2020-04-09 04:53:09 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
2020-04-15 01:42:27 +08:00
|
|
|
<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}"/>
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
<HyperlinkButton Content="Module overview"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Page>
|