Added new controls

This commit is contained in:
Niels Laute
2021-08-08 22:10:19 +02:00
parent db89faf2e1
commit adf07ff0c3
16 changed files with 195 additions and 84 deletions

View File

@@ -17,9 +17,8 @@
<ResourceDictionary Source="/Themes/Colors.xaml"/>
<ResourceDictionary Source="/Themes/SettingsExpanderStyles.xaml"/>
<ResourceDictionary Source="/Themes/SettingsSectionStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="InfoBarIconMargin">6,16,16,16</Thickness>
<Thickness x:Key="InfoBarContentRootPadding">16,0,0,0</Thickness>
@@ -28,7 +27,7 @@
<Style TargetType="ListViewItem" >
<Setter Property="Margin" Value="0,0,0,2" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
@@ -63,13 +62,6 @@
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="Transparent"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Application.Resources>
</xaml:XamlApplication>

View File

@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Controls
{
public class SettingExpander : Expander
{
public SettingExpander()
{
DefaultStyleKey = typeof(SettingExpander);
}
}
}

View File

@@ -0,0 +1,15 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls">
<Style TargetType="controls:SettingExpander" BasedOn="{StaticResource DefaultExpanderStyle}" >
<Setter Property="Background" Value="{ThemeResource CardBackgroundBrush}" />
<Setter Property="BorderThickness" Value="{ThemeResource CardBorderThickness}" />
<Setter Property="BorderBrush" Value="{ThemeResource CardBorderBrush}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,59 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Controls
{
/// <summary>
/// Represents a control that can contain multiple settings (or other) controls
/// </summary>
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
public partial class SettingsGroup : ItemsControl
{
public SettingsGroup()
{
DefaultStyleKey = typeof(SettingsGroup);
}
public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
"Header",
typeof(string),
typeof(SettingsGroup),
new PropertyMetadata(default(string)));
[Localizable(true)]
public string Header
{
get => (string)GetValue(HeaderProperty);
set => SetValue(HeaderProperty, value);
}
protected override void OnApplyTemplate()
{
IsEnabledChanged -= SettingsGroup_IsEnabledChanged;
SetEnabledState();
IsEnabledChanged += SettingsGroup_IsEnabledChanged;
base.OnApplyTemplate();
}
private void SettingsGroup_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
{
SetEnabledState();
}
private void SetEnabledState()
{
VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true);
}
}
}

View File

@@ -0,0 +1,44 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls">
<Style TargetType="controls:SettingsGroup">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Spacing="2"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:SettingsGroup">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="HeaderPresenter.Foreground" Value="{ThemeResource TextFillColorDisabledBrush}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Name="HeaderPresenter"
Text="{TemplateBinding Header}"
Grid.Row="0"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Margin="2,32,0,8"
AutomationProperties.HeadingLevel="Level2"/>
<ItemsPresenter Grid.Row="1"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@@ -99,6 +99,8 @@
<DependentUpon>HotkeySettingsControl.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\KeyVisual\KeyVisual.cs" />
<Compile Include="Controls\SettingExpander\SettingExpander.cs" />
<Compile Include="Controls\SettingsGroup\SettingsGroup.cs" />
<Compile Include="Controls\Setting\Setting.cs" />
<Compile Include="Controls\ShortcutTextControl.xaml.cs">
<DependentUpon>ShortcutTextControl.xaml</DependentUpon>
@@ -311,6 +313,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\SettingExpander\SettingExpander.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\SettingsGroup\SettingsGroup.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\Setting\Setting.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -407,10 +417,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\SettingsSectionStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\AwakePage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

View File

@@ -4,5 +4,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///Controls/Setting/Setting.xaml" />
<ResourceDictionary Source="ms-appx:///Controls/SettingsGroup/SettingsGroup.xaml" />
<ResourceDictionary Source="ms-appx:///Controls/SettingExpander/SettingExpander.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -1,25 +0,0 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls">
<!-- Template for the header of a section of settings -->
<DataTemplate x:Key="SectionHeaderTemplate">
<TextBlock Text="{Binding}"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Margin="2,32,0,8"
AutomationProperties.HeadingLevel="Level2" />
</DataTemplate>
<!-- Template for content of a section of settings -->
<Style TargetType="toolkitcontrols:HeaderedItemsControl">
<Setter Property="HeaderTemplate" Value="{StaticResource SectionHeaderTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Spacing="2"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@@ -33,7 +33,7 @@
<toolkitcontrols:HeaderedItemsControl x:Uid="Awake_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="Awake_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:Setting x:Uid="Awake_EnableDisplayKeepAwake" Icon="&#xE7FB;">
<controls:Setting.ActionContent>
<ToggleSwitch FlowDirection="RightToLeft" IsOn="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}" />
@@ -105,7 +105,7 @@
</StackPanel>
</muxc:Expander.Content>
</muxc:Expander>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>

View File

@@ -6,9 +6,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
mc:Ignorable="d"
AutomationProperties.LandmarkType="Main">
@@ -29,7 +26,7 @@
</controls:Setting.ActionContent>
</controls:Setting>
<toolkitcontrols:HeaderedItemsControl x:Uid="Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:Setting x:Uid="Activation_Shortcut" Icon="&#xEDA7;">
<controls:Setting.Description>
<TextBlock>
@@ -41,8 +38,8 @@
<controls:HotkeySettingsControl Width="240" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" Keys="Win, Ctrl, Alt, Shift"/>
</controls:Setting.ActionContent>
</controls:Setting>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
@@ -83,7 +80,7 @@
</muxc:Expander>
<toolkitcontrols:HeaderedItemsControl x:Uid="ColorFormats" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="ColorFormats" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander.Header>
<controls:Setting x:Uid="ColorPicker_CopiedColorRepresentation" Icon="&#xEF3C;" Style="{StaticResource ExpanderHeaderSettingStyle}">
@@ -115,9 +112,9 @@
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{Binding IsEnabled}"/>
-->
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="ColorPicker_Editor" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="ColorPicker_Editor" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:Setting x:Uid="ColorPicker_ColorFormats" Icon="&#xE14C;"/>
<!-- Disabled reordering by dragging -->
@@ -198,7 +195,7 @@
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>

View File

@@ -19,9 +19,17 @@
ModuleImageLink="https://aka.ms/PowerToysOverview_FancyZones">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<ToggleSwitch x:Name="FancyZones_EnableToggleControl_HeaderText"
x:Uid="FancyZones_EnableToggleControl_HeaderText"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"/>
<controls:Setting x:Uid="FancyZones_EnableToggleControl_HeaderText">
<controls:Setting.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsFancyZones.png" ShowAsMonochrome="False" />
</controls:Setting.Icon>
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" FlowDirection="RightToLeft" />
</controls:Setting.ActionContent>
</controls:Setting>
<TextBlock x:Uid="FancyZones_Editor_GroupSettings"
Style="{StaticResource SettingsGroupTitleStyle}"

View File

@@ -8,7 +8,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:toolkitconverters="using:Microsoft.Toolkit.Uwp.UI.Converters"
mc:Ignorable="d"
AutomationProperties.LandmarkType="Main" x:Name="RootPage">
@@ -34,7 +33,7 @@
</controls:Setting>
<toolkitcontrols:HeaderedItemsControl x:Uid="ImageResizer_CustomSizes" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="ImageResizer_CustomSizes" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:Setting x:Uid="ImageResizer_CustomSizes" Icon="&#xE2B2;">
<controls:Setting.ActionContent>
<Button x:Uid="ImageResizer_AddSizeButton" Click="AddSizeButton_Click" Style="{ThemeResource AccentButtonStyle}" />
@@ -161,10 +160,10 @@
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="Encoding" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="Encoding" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:Setting x:Uid="ImageResizer_FallBackEncoderText">
<controls:Setting.ActionContent>
<ComboBox SelectedIndex="{x:Bind Path=ViewModel.Encoder, Mode=TwoWay}"
@@ -216,10 +215,10 @@
</controls:Setting.ActionContent>
</controls:Setting>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="File" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="File" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander.Header>
<controls:Setting x:Uid="ImageResizer_FilenameFormatHeader" Style="{StaticResource ExpanderHeaderSettingStyle}">
@@ -276,7 +275,7 @@
Margin="16,0,0,0" />
</muxc:Expander.Content>
</muxc:Expander>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
</StackPanel>

View File

@@ -5,10 +5,8 @@
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:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:Lib="using:Microsoft.PowerToys.Settings.UI.Library"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
mc:Ignorable="d"
AutomationProperties.LandmarkType="Main">
@@ -93,7 +91,7 @@
</controls:Setting>
<toolkitcontrols:HeaderedItemsControl x:Uid="KeyboardManager_Keys" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<controls:SettingsGroup x:Uid="KeyboardManager_Keys" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<controls:Setting x:Uid="KeyboardManager_RemapKeys" Icon="&#xE92E;">
<controls:Setting.ActionContent>
<Button x:Uid="KeyboardManager_RemapKeyboardButton"
@@ -149,10 +147,10 @@
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="KeyboardManager_Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<controls:SettingsGroup x:Uid="KeyboardManager_Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<controls:Setting x:Uid="KeyboardManager_RemapShortcuts" Icon="&#xEDA7;">
<controls:Setting.ActionContent>
<Button x:Uid="KeyboardManager_RemapShortcutsButton"
@@ -215,7 +213,7 @@
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.ModuleLinks>

View File

@@ -6,7 +6,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d"
AutomationProperties.LandmarkType="Main">
@@ -35,7 +34,7 @@
IsClosable="False"
/>
<toolkitcontrols:HeaderedItemsControl x:Uid="FileExplorerPreview_PreviewPane_GroupSettings">
<controls:SettingsGroup x:Uid="FileExplorerPreview_PreviewPane_GroupSettings">
<controls:Setting x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG" Icon="&#xE91B;">
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGRenderIsEnabled}" FlowDirection="RightToLeft" />
@@ -47,9 +46,9 @@
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MDRenderIsEnabled}" FlowDirection="RightToLeft" />
</controls:Setting.ActionContent>
</controls:Setting>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="FileExplorerPreview_IconThumbnail_GroupSettings">
<controls:SettingsGroup x:Uid="FileExplorerPreview_IconThumbnail_GroupSettings">
<muxc:InfoBar Severity="Informational"
x:Uid="FileExplorerPreview_RebootRequired"
@@ -63,7 +62,7 @@
</controls:Setting>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<!--<TextBlock x:Uid=""
Style="{StaticResource SettingsGroupTitleStyleAsHeader}"
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.IsElevated, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>-->

View File

@@ -6,7 +6,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
mc:Ignorable="d"
AutomationProperties.LandmarkType="Main">
@@ -14,8 +13,6 @@
ModuleImageSource="ms-appx:///Assets/Modules/PowerRename.png"
ModuleImageLink="https://aka.ms/PowerToysOverview_PowerRename">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical"
x:Name="PowerRenameView"
HorizontalAlignment="Stretch">
@@ -29,7 +26,7 @@
</controls:Setting.ActionContent>
</controls:Setting>
<toolkitcontrols:HeaderedItemsControl x:Uid="PowerRename_ShellIntegration">
<controls:SettingsGroup x:Uid="PowerRename_ShellIntegration">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander.Header>
<controls:Setting x:Uid="PowerRename_Toggle_EnableOnContextMenu" Icon="&#xE14C;" Style="{StaticResource ExpanderHeaderSettingStyle}">
@@ -44,9 +41,9 @@
Margin="{StaticResource ExpanderSettingMargin}" />
</muxc:Expander.Content>
</muxc:Expander>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="PowerRename_AutoCompleteHeader">
<controls:SettingsGroup x:Uid="PowerRename_AutoCompleteHeader">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander.Header>
<controls:Setting x:Uid="PowerRename_Toggle_AutoComplete" Style="{StaticResource ExpanderHeaderSettingStyle}">
@@ -75,17 +72,17 @@
</StackPanel>
</muxc:Expander.Content>
</muxc:Expander>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
<toolkitcontrols:HeaderedItemsControl x:Uid="PowerRename_BehaviorHeader">
<controls:SettingsGroup x:Uid="PowerRename_BehaviorHeader">
<controls:Setting x:Uid="PowerRename_Toggle_UseBoostLib">
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.UseBoostLib}" FlowDirection="RightToLeft" />
</controls:Setting.ActionContent>
</controls:Setting>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>

View File

@@ -6,7 +6,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
mc:Ignorable="d"
AutomationProperties.LandmarkType="Main">
@@ -48,7 +47,7 @@
</controls:Setting.ActionContent>
</controls:Setting>
<toolkitcontrols:HeaderedItemsControl x:Uid="ShortcutGuide_Appearance_Behavior" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsGroup x:Uid="ShortcutGuide_Appearance_Behavior" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander.Header>
<controls:Setting x:Uid="ColorModeHeader" Icon="&#xE771;" Style="{StaticResource ExpanderHeaderSettingStyle}">
@@ -94,7 +93,7 @@
MinHeight="160" />
</muxc:Expander.Content>
</muxc:Expander>
</toolkitcontrols:HeaderedItemsControl>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.ModuleLinks>