2021-08-23 19:48:52 +02:00
|
|
|
<UserControl
|
|
|
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Controls.SettingsPageControl"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2024-01-12 18:01:40 +01:00
|
|
|
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
2021-08-23 19:48:52 +02:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-01-12 18:01:40 +01:00
|
|
|
xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls"
|
2021-11-30 14:43:04 +01:00
|
|
|
Loaded="UserControl_Loaded"
|
2021-08-23 19:48:52 +02:00
|
|
|
mc:Ignorable="d">
|
|
|
|
|
<UserControl.Resources>
|
2022-11-23 19:57:09 +01:00
|
|
|
<x:Double x:Key="PageMaxWidth">1000</x:Double>
|
2025-07-03 11:33:56 +02:00
|
|
|
<x:Double x:Key="PageHeaderMaxWidth">1020</x:Double>
|
2021-08-23 19:48:52 +02:00
|
|
|
</UserControl.Resources>
|
2023-04-21 18:59:08 +02:00
|
|
|
<Grid Padding="20,0,0,0" RowSpacing="24">
|
2021-08-23 19:48:52 +02:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
2022-11-23 19:57:09 +01:00
|
|
|
<RowDefinition Height="*" />
|
2021-08-23 19:48:52 +02:00
|
|
|
</Grid.RowDefinitions>
|
2022-11-23 19:57:09 +01:00
|
|
|
<TextBlock
|
|
|
|
|
x:Name="Header"
|
2025-07-03 11:33:56 +02:00
|
|
|
MaxWidth="{StaticResource PageHeaderMaxWidth}"
|
2022-11-23 19:57:09 +01:00
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
AutomationProperties.HeadingLevel="1"
|
|
|
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
|
|
|
Text="{x:Bind ModuleTitle}" />
|
2021-08-23 19:48:52 +02:00
|
|
|
|
|
|
|
|
<ScrollViewer Grid.Row="1">
|
2023-04-21 18:59:08 +02:00
|
|
|
<Grid
|
2022-11-23 19:57:09 +01:00
|
|
|
Padding="0,0,20,48"
|
2023-04-21 18:59:08 +02:00
|
|
|
ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
|
2022-11-23 19:57:09 +01:00
|
|
|
RowSpacing="24">
|
2021-08-23 19:48:52 +02:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
2022-11-23 19:57:09 +01:00
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
2021-08-23 19:48:52 +02:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
2022-11-23 19:57:09 +01:00
|
|
|
<!-- Top panel -->
|
|
|
|
|
<Grid
|
|
|
|
|
MaxWidth="{StaticResource PageMaxWidth}"
|
2023-04-21 18:59:08 +02:00
|
|
|
ColumnSpacing="16"
|
|
|
|
|
RowSpacing="16">
|
2021-08-23 19:48:52 +02:00
|
|
|
<Grid.ColumnDefinitions>
|
2023-04-21 18:59:08 +02:00
|
|
|
<ColumnDefinition Width="Auto" />
|
2021-08-23 19:48:52 +02:00
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2023-04-21 18:59:08 +02:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
2022-11-23 19:57:09 +01:00
|
|
|
<Border
|
2023-04-21 18:59:08 +02:00
|
|
|
MaxWidth="160"
|
|
|
|
|
HorizontalAlignment="Left"
|
2022-11-23 19:57:09 +01:00
|
|
|
VerticalAlignment="Top"
|
2025-08-05 01:33:19 +02:00
|
|
|
CornerRadius="{StaticResource OverlayCornerRadius}">
|
2021-08-23 19:48:52 +02:00
|
|
|
<Image AutomationProperties.AccessibilityView="Raw">
|
|
|
|
|
<Image.Source>
|
|
|
|
|
<BitmapImage UriSource="{x:Bind ModuleImageSource}" />
|
|
|
|
|
</Image.Source>
|
|
|
|
|
</Image>
|
|
|
|
|
</Border>
|
|
|
|
|
|
2023-04-21 18:59:08 +02:00
|
|
|
<StackPanel x:Name="DescriptionPanel" Grid.Column="1">
|
2022-11-23 19:57:09 +01:00
|
|
|
<TextBlock
|
|
|
|
|
x:Name="AboutDescription"
|
|
|
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
|
|
|
Text="{x:Bind ModuleDescription}"
|
|
|
|
|
TextWrapping="Wrap" />
|
2021-08-23 19:48:52 +02:00
|
|
|
|
2022-11-23 19:57:09 +01:00
|
|
|
<ItemsControl
|
|
|
|
|
x:Name="PrimaryLinksControl"
|
|
|
|
|
Margin="0,8,0,0"
|
|
|
|
|
IsTabStop="False"
|
|
|
|
|
ItemsSource="{x:Bind PrimaryLinks}">
|
2021-08-23 19:48:52 +02:00
|
|
|
<ItemsControl.ItemTemplate>
|
2024-01-12 18:01:40 +01:00
|
|
|
<DataTemplate x:DataType="controls:PageLink">
|
2023-04-21 18:59:08 +02:00
|
|
|
<HyperlinkButton NavigateUri="{x:Bind Link}" Style="{StaticResource TextButtonStyle}">
|
|
|
|
|
<TextBlock Text="{x:Bind Text}" TextWrapping="Wrap" />
|
2021-08-23 19:48:52 +02:00
|
|
|
</HyperlinkButton>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
2024-01-12 18:01:40 +01:00
|
|
|
<tk7controls:WrapPanel HorizontalSpacing="24" Orientation="Horizontal" />
|
2021-08-23 19:48:52 +02:00
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2022-11-23 19:57:09 +01:00
|
|
|
<!-- Content panel -->
|
|
|
|
|
<ContentPresenter
|
|
|
|
|
x:Name="ModuleContentPresenter"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
MaxWidth="{StaticResource PageMaxWidth}"
|
|
|
|
|
Margin="0,12,0,0"
|
|
|
|
|
Content="{x:Bind ModuleContent}" />
|
2021-08-23 19:48:52 +02:00
|
|
|
|
2022-11-23 19:57:09 +01:00
|
|
|
<!-- Bottom panel -->
|
|
|
|
|
<StackPanel
|
|
|
|
|
x:Name="SecondaryLinksPanel"
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
MaxWidth="{StaticResource PageMaxWidth}"
|
2025-02-19 00:22:56 +01:00
|
|
|
AutomationProperties.Name="{x:Bind SecondaryLinksHeader}"
|
2022-11-23 19:57:09 +01:00
|
|
|
Orientation="Vertical"
|
2025-08-05 01:33:19 +02:00
|
|
|
Visibility="{x:Bind SecondaryLinks.Count, Converter={StaticResource DoubleToVisibilityConverter}}">
|
2022-11-23 19:57:09 +01:00
|
|
|
<TextBlock
|
|
|
|
|
Margin="2,8,0,0"
|
|
|
|
|
AutomationProperties.HeadingLevel="Level2"
|
|
|
|
|
Style="{ThemeResource BodyStrongTextBlockStyle}"
|
|
|
|
|
Text="{x:Bind SecondaryLinksHeader}" />
|
|
|
|
|
<ItemsControl
|
|
|
|
|
x:Name="SecondaryLinksItemControl"
|
|
|
|
|
Margin="2,0,0,0"
|
|
|
|
|
IsTabStop="False"
|
|
|
|
|
ItemsSource="{x:Bind SecondaryLinks}">
|
2021-08-23 19:48:52 +02:00
|
|
|
<ItemsControl.ItemTemplate>
|
2024-01-12 18:01:40 +01:00
|
|
|
<DataTemplate x:DataType="controls:PageLink">
|
2023-04-21 18:59:08 +02:00
|
|
|
<HyperlinkButton NavigateUri="{x:Bind Link}" Style="{StaticResource TextButtonStyle}">
|
|
|
|
|
<TextBlock Text="{x:Bind Text}" TextWrapping="Wrap" />
|
2021-08-23 19:48:52 +02:00
|
|
|
</HyperlinkButton>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
2024-01-12 18:01:40 +01:00
|
|
|
<tk7controls:WrapPanel HorizontalSpacing="24" Orientation="Horizontal" />
|
2021-08-23 19:48:52 +02:00
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</ScrollViewer>
|
2023-10-24 12:25:55 +02:00
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup>
|
|
|
|
|
<VisualState>
|
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="480" />
|
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState>
|
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="0" />
|
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Target="DescriptionPanel.(Grid.Row)" Value="1" />
|
|
|
|
|
<Setter Target="DescriptionPanel.(Grid.Column)" Value="0" />
|
|
|
|
|
<Setter Target="DescriptionPanel.(Grid.ColumnSpan)" Value="2" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
2021-08-23 19:48:52 +02:00
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|