2021-07-05 16:25:23 +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"
|
|
|
|
|
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:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
2021-07-22 11:01:34 +02:00
|
|
|
mc:Ignorable="d">
|
2021-07-05 16:25:23 +02:00
|
|
|
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<converters:DoubleToVisibilityConverter x:Name="doubleToVisibilityConverter" GreaterThan="0" TrueValue="Visible" FalseValue="Collapsed" />
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
2021-07-22 11:01:34 +02:00
|
|
|
<Grid RowSpacing="{StaticResource DefaultRowSpacing}" Margin="0">
|
2021-07-05 16:25:23 +02:00
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup x:Name="LayoutVisualStates">
|
|
|
|
|
<VisualState x:Name="WideLayout">
|
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
|
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="SmallLayout">
|
|
|
|
|
<VisualState.StateTriggers>
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
|
|
|
|
|
<AdaptiveTrigger MinWindowWidth="0" />
|
|
|
|
|
</VisualState.StateTriggers>
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Target="SidePanel.(Grid.Column)" Value="0"/>
|
|
|
|
|
<Setter Target="SidePanel.Width" Value="Auto"/>
|
2021-07-22 11:01:34 +02:00
|
|
|
<Setter Target="SidePanel.Margin" Value="24,0,24,0"/>
|
|
|
|
|
<Setter Target="ModuleContentPresenter.(Grid.Row)" Value="2" />
|
|
|
|
|
<Setter Target="ModuleContentPresenter.Margin" Value="24,0,0,0" />
|
2021-07-05 16:25:23 +02:00
|
|
|
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage" />
|
|
|
|
|
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage" />
|
|
|
|
|
<Setter Target="LinksPanel.Margin" Value="0,12,0,0" />
|
2021-07-22 13:49:17 +02:00
|
|
|
<Setter Target="AboutImage.Margin" Value="0,12,12,0" />
|
2021-07-22 11:01:34 +02:00
|
|
|
<Setter Target="Header.Margin" Value="24,44,0,0" />
|
2021-07-05 16:25:23 +02:00
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
2021-07-22 11:01:34 +02:00
|
|
|
<RowDefinition Height="Auto" />
|
2021-07-05 16:25:23 +02:00
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
2021-07-22 11:01:34 +02:00
|
|
|
<TextBlock x:Name="Header"
|
|
|
|
|
Text="{x:Bind ModuleTitle}"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Margin="48,44,0,0"
|
|
|
|
|
VerticalAlignment="Stretch"/>
|
|
|
|
|
|
2021-07-05 16:25:23 +02:00
|
|
|
<ContentPresenter x:Name="ModuleContentPresenter"
|
|
|
|
|
Content="{x:Bind ModuleContent}"
|
2021-07-22 11:01:34 +02:00
|
|
|
Margin="48,12,48,0"
|
2021-07-05 16:25:23 +02:00
|
|
|
HorizontalAlignment="Left"
|
2021-07-22 11:01:34 +02:00
|
|
|
Grid.Row="1"
|
2021-07-05 16:25:23 +02:00
|
|
|
MaxWidth="{StaticResource MaxContentWidth}"/>
|
|
|
|
|
|
2021-07-22 11:01:34 +02:00
|
|
|
<RelativePanel Grid.Column="1"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
x:Name="SidePanel"
|
|
|
|
|
Width="{StaticResource SidePanelWidth}"
|
|
|
|
|
Margin="0,12,48,0">
|
|
|
|
|
|
|
|
|
|
<TextBlock x:Name="AboutDescription"
|
|
|
|
|
Text="{x:Bind ModuleDescription}"
|
|
|
|
|
Foreground="{StaticResource TextFillColorSecondaryBrush}"
|
|
|
|
|
TextWrapping="Wrap"/>
|
2021-07-05 16:25:23 +02:00
|
|
|
|
|
|
|
|
<HyperlinkButton x:Name="AboutImage"
|
2021-07-22 11:01:34 +02:00
|
|
|
RelativePanel.Below="AboutDescription"
|
2021-07-05 16:25:23 +02:00
|
|
|
MaxWidth="240"
|
2021-07-22 13:49:17 +02:00
|
|
|
CornerRadius="8"
|
2021-07-16 21:21:06 +02:00
|
|
|
x:Uid="Learn_More_Description"
|
2021-07-22 13:49:17 +02:00
|
|
|
Padding="0"
|
|
|
|
|
Background="Red"
|
2021-07-05 16:25:23 +02:00
|
|
|
NavigateUri="{x:Bind ModuleImageLink}"
|
2021-07-22 13:49:17 +02:00
|
|
|
Margin="0, 12, 0, 12">
|
2021-07-05 16:25:23 +02:00
|
|
|
<Image>
|
|
|
|
|
<Image.Source>
|
|
|
|
|
<BitmapImage UriSource="{x:Bind ModuleImageSource}" />
|
|
|
|
|
</Image.Source>
|
|
|
|
|
</Image>
|
|
|
|
|
</HyperlinkButton>
|
|
|
|
|
|
|
|
|
|
<StackPanel x:Name="LinksPanel"
|
|
|
|
|
Margin="0,1,0,0"
|
|
|
|
|
RelativePanel.Below="AboutImage"
|
|
|
|
|
Orientation="Vertical">
|
|
|
|
|
|
|
|
|
|
<StackPanel x:Name="ModuleLinksPanel" Orientation="Vertical">
|
|
|
|
|
<ItemsControl ItemsSource="{x:Bind ModuleLinks}">
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate x:DataType="local:SidePanelLink">
|
2021-07-22 11:01:34 +02:00
|
|
|
<HyperlinkButton NavigateUri="{x:Bind Link}" Margin="-12,-3,0,0">
|
2021-07-05 16:25:23 +02:00
|
|
|
<TextBlock Text="{x:Bind Label}" TextWrapping="Wrap" />
|
|
|
|
|
</HyperlinkButton>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel x:Name="AttributionPanel"
|
|
|
|
|
Visibility="{x:Bind AttributionLinks.Count, Converter={StaticResource doubleToVisibilityConverter}}"
|
|
|
|
|
Orientation="Vertical">
|
|
|
|
|
<TextBlock x:Uid="AttributionTitle" Style="{StaticResource SettingsGroupTitleStyle}" />
|
|
|
|
|
|
|
|
|
|
<ItemsControl x:Name="AttributionLinksItemControl" ItemsSource="{x:Bind AttributionLinks}">
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate x:DataType="local:SidePanelLink">
|
2021-07-22 11:01:34 +02:00
|
|
|
<HyperlinkButton NavigateUri="{x:Bind Link}" Margin="-12,-3,0,0">
|
2021-07-05 16:25:23 +02:00
|
|
|
<TextBlock Text="{x:Bind Label}" TextWrapping="Wrap" />
|
|
|
|
|
</HyperlinkButton>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</RelativePanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|