mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
104 lines
5.7 KiB
Plaintext
104 lines
5.7 KiB
Plaintext
|
|
<UserControl
|
||
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Controls.ShortcutDialogContentControl"
|
||
|
|
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.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||
|
|
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
x:Name="ShortcutContentControl">
|
||
|
|
<UserControl.Resources>
|
||
|
|
<converters:BoolToVisibilityConverter x:Key="boolToVisibilityConverter" FalseValue="Collapsed" TrueValue="Visible" />
|
||
|
|
</UserControl.Resources>
|
||
|
|
<Grid MinWidth="498" MinHeight="220">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
<RowDefinition MinHeight="110"/>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<TextBlock x:Uid="Activation_Shortcut_Description" Grid.Row="0" />
|
||
|
|
|
||
|
|
<ItemsControl x:Name="KeysControl"
|
||
|
|
Height="56"
|
||
|
|
Grid.Row="1"
|
||
|
|
Margin="0,64,0,0"
|
||
|
|
HorizontalContentAlignment="Center"
|
||
|
|
ItemsSource="{x:Bind Keys, Mode=OneWay}"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Top">
|
||
|
|
<ItemsControl.ItemsPanel>
|
||
|
|
<ItemsPanelTemplate>
|
||
|
|
<StackPanel Orientation="Horizontal" Spacing="8"/>
|
||
|
|
</ItemsPanelTemplate>
|
||
|
|
</ItemsControl.ItemsPanel>
|
||
|
|
<ItemsControl.ItemTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<local:KeyVisual AutomationProperties.AccessibilityView="Raw"
|
||
|
|
Height="56"
|
||
|
|
VisualType="Large"
|
||
|
|
IsError="{Binding ElementName=ShortcutContentControl, Path=IsError, Mode=OneWay}"
|
||
|
|
IsTabStop="False"
|
||
|
|
Content="{Binding}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</ItemsControl.ItemTemplate>
|
||
|
|
</ItemsControl>
|
||
|
|
|
||
|
|
<StackPanel Orientation="Vertical"
|
||
|
|
Grid.Row="2"
|
||
|
|
Spacing="8"
|
||
|
|
|
||
|
|
Margin="0,24,0,0"
|
||
|
|
VerticalAlignment="Top">
|
||
|
|
<Grid Height="36">
|
||
|
|
|
||
|
|
<Border x:Name="WarningBanner"
|
||
|
|
Background="{ThemeResource InfoBarErrorSeverityBackgroundBrush}"
|
||
|
|
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||
|
|
BorderBrush="{ThemeResource InfoBarBorderBrush}"
|
||
|
|
BorderThickness="{ThemeResource InfoBarBorderThickness}"
|
||
|
|
Padding="8"
|
||
|
|
Margin="-2,0,0,0"
|
||
|
|
Visibility="{Binding ElementName=ShortcutContentControl, Path=IsError, Mode=OneWay, Converter={StaticResource boolToVisibilityConverter}}">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="Auto"/>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<!-- To do: replace with InfoBadge once we move towards WinUI 2.7 -->
|
||
|
|
<Grid VerticalAlignment="Center" Margin="2,0,12,0" AutomationProperties.AccessibilityView="Raw">
|
||
|
|
<TextBlock x:Name="IconBackground"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
FontSize="{StaticResource InfoBarIconFontSize}"
|
||
|
|
Text="{StaticResource InfoBarIconBackgroundGlyph}"
|
||
|
|
Foreground="{ThemeResource InfoBarErrorSeverityIconBackground}"
|
||
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||
|
|
AutomationProperties.AccessibilityView="Raw" />
|
||
|
|
|
||
|
|
<TextBlock x:Name="StandardIcon"
|
||
|
|
FontSize="{StaticResource InfoBarIconFontSize}"
|
||
|
|
Text="{StaticResource InfoBarErrorIconGlyph}"
|
||
|
|
Foreground="{ThemeResource InfoBarErrorSeverityIconForeground}"
|
||
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"/>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
|
||
|
|
<TextBlock x:Name="InvalidShortcutWarningLabel"
|
||
|
|
x:Uid="InvalidShortcut"
|
||
|
|
Foreground="{ThemeResource InfoBarTitleForeground}"
|
||
|
|
FontWeight="{ThemeResource InfoBarTitleFontWeight}"
|
||
|
|
Grid.Column="1" />
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
<toolkitcontrols:MarkdownTextBlock x:Uid="InvalidShortcutWarningLabel"
|
||
|
|
FontSize="12"
|
||
|
|
Background="Transparent"
|
||
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</UserControl>
|