Merge remote-tracking branch 'origin/main' into dev/snickler/net8-upgrade

This commit is contained in:
Jeremy Sinclair 2023-09-15 23:17:40 -04:00
commit 390e0e5781
86 changed files with 1968 additions and 2582 deletions

View File

@ -1919,6 +1919,7 @@ textblock
TEXTEXTRACTOR TEXTEXTRACTOR
TEXTINCLUDE TEXTINCLUDE
tgz tgz
themeresources
THH THH
THICKFRAME THICKFRAME
THISCOMPONENT THISCOMPONENT

View File

@ -14,7 +14,7 @@
"PowerToys.exe", "PowerToys.exe",
"PowerToys.FilePreviewCommon.dll", "PowerToys.FilePreviewCommon.dll",
"PowerToys.Interop.dll", "PowerToys.Interop.dll",
"BugReportTool\\PowerToys.BugReportTool.exe", "Tools\\PowerToys.BugReportTool.exe",
"WebcamReportTool\\PowerToys.WebcamReportTool.exe", "WebcamReportTool\\PowerToys.WebcamReportTool.exe",
"StylesReportTool\\PowerToys.StylesReportTool.exe", "StylesReportTool\\PowerToys.StylesReportTool.exe",
"Telemetry.dll", "Telemetry.dll",

View File

@ -4,11 +4,16 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageVersion Include="Appium.WebDriver" Version="4.2.1" /> <PackageVersion Include="Appium.WebDriver" Version="4.2.1" />
<PackageVersion Include="CommunityToolkit.Labs.WinUI.SettingsControls" Version="0.0.18" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.0" /> <PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageVersion Include="CommunityToolkit.WinUI.UI" Version="7.1.2" /> <PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Animations" Version="7.1.2" /> <PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" /> <PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.Collections " Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
<PackageVersion Include="ControlzEx" Version="6.0.0" /> <PackageVersion Include="ControlzEx" Version="6.0.0" />
<PackageVersion Include="coverlet.collector" Version="1.3.0" /> <PackageVersion Include="coverlet.collector" Version="1.3.0" />
<PackageVersion Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" /> <PackageVersion Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
@ -33,7 +38,7 @@
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" /> <PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. --> <!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.3" /> <PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.3" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" /> <PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" /> <PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.230822000" /> <PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.230822000" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" /> <PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />

View File

@ -281,11 +281,16 @@ SOFTWARE.
## NuGet Packages used by PowerToys ## NuGet Packages used by PowerToys
- CommunityToolkit.Labs.WinUI.SettingsControls 0.0.18
- CommunityToolkit.Mvvm 8.2.0 - CommunityToolkit.Mvvm 8.2.0
- CommunityToolkit.WinUI.UI 7.1.2 - CommunityToolkit.WinUI.Animations 8.0.230907
- CommunityToolkit.WinUI.UI.Animations 7.1.2 - CommunityToolkit.WinUI.Collections 8.0.230907
- CommunityToolkit.WinUI.UI.Controls 7.1.2 - CommunityToolkit.WinUI.Controls.Primitives 8.0.230907
- CommunityToolkit.WinUI.Controls.SettingsControls 8.0.230907
- CommunityToolkit.WinUI.Controls.Sizers 8.0.230907
- CommunityToolkit.WinUI.Converters 8.0.230907
- CommunityToolkit.WinUI.Extensions 8.0.230907
- CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
- CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2
- ControlzEx 6.0.0 - ControlzEx 6.0.0
- HelixToolkit 2.20.2 - HelixToolkit 2.20.2
- HelixToolkit.Core.Wpf 2.20.2 - HelixToolkit.Core.Wpf 2.20.2
@ -306,7 +311,7 @@ SOFTWARE.
- Microsoft.Windows.Compatibility 7.0.3 - Microsoft.Windows.Compatibility 7.0.3
- Microsoft.Windows.CsWin32 0.2.46-beta - Microsoft.Windows.CsWin32 0.2.46-beta
- Microsoft.Windows.CsWinRT 2.0.3 - Microsoft.Windows.CsWinRT 2.0.3
- Microsoft.Windows.SDK.BuildTools 10.0.22621.755 - Microsoft.Windows.SDK.BuildTools 10.0.22621.756
- Microsoft.Windows.SDK.Contracts 10.0.19041.1 - Microsoft.Windows.SDK.Contracts 10.0.19041.1
- Microsoft.WindowsAppSDK 1.4.230822000 - Microsoft.WindowsAppSDK 1.4.230822000
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9 - Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9

View File

@ -10,7 +10,7 @@
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components"> <RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="BugReportTool_exe" Value="" KeyPath="yes"/> <RegistryValue Type="string" Name="BugReportTool_exe" Value="" KeyPath="yes"/>
</RegistryKey> </RegistryKey>
<File Source="$(var.BinDir)BugReportTool\PowerToys.BugReportTool.exe" Id="BugReportTool.exe" Checksum="yes" /> <File Source="$(var.BinDir)Tools\PowerToys.BugReportTool.exe" Id="BugReportTool.exe" Checksum="yes" />
</Component> </Component>
<Component Id="WebcamReportTool_exe" Win64="yes" Guid="41D5209F-7A9A-4DF2-A22A-9F0A9CF5AA63"> <Component Id="WebcamReportTool_exe" Win64="yes" Guid="41D5209F-7A9A-4DF2-A22A-9F0A9CF5AA63">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components"> <RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">

View File

@ -5,7 +5,6 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using CommunityToolkit.WinUI.UI;
using Microsoft.UI.Xaml.Data; using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Media.Imaging; using Microsoft.UI.Xaml.Media.Imaging;
using Windows.Storage; using Windows.Storage;

View File

@ -71,9 +71,10 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" /> <PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="CommunityToolkit.Labs.WinUI.SettingsControls" /> <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" />
<PackageReference Include="CommunityToolkit.Mvvm" /> <PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="CommunityToolkit.WinUI.UI" />
<PackageReference Include="Microsoft.WindowsAppSDK" /> <PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" /> <PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" />

View File

@ -7,17 +7,18 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:interop="using:FileLocksmith.Interop" xmlns:interop="using:FileLocksmith.Interop"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitConverters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:tkControls="using:CommunityToolkit.WinUI.Controls"
xmlns:tkConverters="using:CommunityToolkit.WinUI.Converters"
xmlns:ui="using:CommunityToolkit.WinUI"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
<toolkitConverters:BoolToVisibilityConverter <tkConverters:BoolToVisibilityConverter
x:Key="boolToVisibilityConverter" x:Key="boolToVisibilityConverter"
FalseValue="Visible" FalseValue="Visible"
TrueValue="Collapsed" /> TrueValue="Collapsed" />
<toolkitConverters:DoubleToVisibilityConverter <tkConverters:DoubleToVisibilityConverter
x:Key="doubleToVisibilityConverter" x:Key="doubleToVisibilityConverter"
FalseValue="Visible" FalseValue="Visible"
GreaterThan="0" GreaterThan="0"
@ -36,14 +37,12 @@
<Grid RowSpacing="8"> <Grid RowSpacing="8">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" x:Name="ButtonsRow" /> <RowDefinition x:Name="ButtonsRow" Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Margin="16,0"> <Grid Margin="16,0">
<Button <Button Click="ShowSelectedPathsButton_Click" Content="{x:Bind ViewModel.Paths, Converter={StaticResource fileListToDescriptionConverter}}">
Click="ShowSelectedPathsButton_Click"
Content="{x:Bind ViewModel.Paths, Converter={StaticResource fileListToDescriptionConverter}}">
<Button.Template> <Button.Template>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<TextBlock <TextBlock
@ -53,9 +52,7 @@
</ControlTemplate> </ControlTemplate>
</Button.Template> </Button.Template>
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock <TextBlock x:Uid="PathsTooltipDescription" TextWrapping="WrapWholeWords" />
x:Uid="PathsTooltipDescription"
TextWrapping="WrapWholeWords" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</Button> </Button>
@ -65,10 +62,9 @@
Spacing="8"> Spacing="8">
<Button <Button
Command="{Binding LoadProcessesCommand}" Command="{Binding LoadProcessesCommand}"
Content="{ui:FontIcon Glyph=&#xe72c;,
FontSize=16}"
Style="{StaticResource SubtleButtonStyle}"> Style="{StaticResource SubtleButtonStyle}">
<FontIcon
FontSize="16"
Glyph="&#xe72c;" />
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="Reload" /> <TextBlock x:Uid="Reload" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
@ -76,11 +72,10 @@
<Button <Button
x:Name="RestartAsAdminBtn" x:Name="RestartAsAdminBtn"
Command="{Binding RestartElevatedCommand}" Command="{Binding RestartElevatedCommand}"
Content="{ui:FontIcon Glyph=&#xe7ef;,
FontSize=16}"
Style="{StaticResource SubtleButtonStyle}" Style="{StaticResource SubtleButtonStyle}"
Visibility="{x:Bind ViewModel.IsElevated, Converter={StaticResource boolToVisibilityConverter}}"> Visibility="{x:Bind ViewModel.IsElevated, Converter={StaticResource boolToVisibilityConverter}}">
<FontIcon
FontSize="16"
Glyph="&#xe7ef;" />
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="RestartAsAdmin" /> <TextBlock x:Uid="RestartAsAdmin" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
@ -92,80 +87,68 @@
<Grid Visibility="{x:Bind ViewModel.IsLoading, Converter={StaticResource boolToVisibilityConverter}, Mode=OneWay}"> <Grid Visibility="{x:Bind ViewModel.IsLoading, Converter={StaticResource boolToVisibilityConverter}, Mode=OneWay}">
<ListView <ListView
x:Name="ProcessesListView" x:Name="ProcessesListView"
Padding="0,0,0,12"
IncrementalLoadingThreshold="10" IncrementalLoadingThreshold="10"
ItemsSource="{x:Bind ViewModel.Processes}" ItemsSource="{x:Bind ViewModel.Processes}"
SelectionMode="None" SelectionMode="None">
Padding="0,0,0,12">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate x:DataType="interop:ProcessResult"> <DataTemplate x:DataType="interop:ProcessResult">
<labs:SettingsExpander Margin="0,0,0,4"> <tkControls:SettingsExpander Margin="0,0,0,4">
<labs:SettingsExpander.Resources> <tkControls:SettingsExpander.Resources>
<x:Double x:Key="SettingsCardWrapThreshold">0</x:Double> <x:Double x:Key="SettingsCardWrapThreshold">0</x:Double>
</labs:SettingsExpander.Resources> </tkControls:SettingsExpander.Resources>
<labs:SettingsExpander.Header> <tkControls:SettingsExpander.Header>
<!-- We can't use the HeaderIcon because it only support a BitmapIcon, which only supports UriSource - not a direct BitmapImage --> <!-- We can't use the HeaderIcon because it only support a BitmapIcon, which only supports UriSource - not a direct BitmapImage -->
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<Image <Image
Width="16" Width="16"
Height="16" Height="16"
Source="{x:Bind pid, Converter={StaticResource pidToIconConverter}}" /> Source="{x:Bind pid, Converter={StaticResource pidToIconConverter}}" />
<TextBlock <TextBlock IsTextSelectionEnabled="True" Text="{x:Bind name}" />
IsTextSelectionEnabled="True"
Text="{x:Bind name}" />
</StackPanel> </StackPanel>
</labs:SettingsExpander.Header> </tkControls:SettingsExpander.Header>
<labs:SettingsExpander.Content> <tkControls:SettingsExpander.Content>
<StackPanel <StackPanel Orientation="Horizontal" Spacing="8">
Orientation="Horizontal"
Spacing="8">
<FontIcon <FontIcon
Foreground="{ThemeResource InfoBarWarningSeverityIconBackground}" Foreground="{ThemeResource InfoBarWarningSeverityIconBackground}"
Glyph="&#xE7BA;" Glyph="&#xE7BA;"
Visibility="{x:Bind user, Mode=OneTime, Converter={StaticResource userToSystemWarningVisibilityConverter}}"> Visibility="{x:Bind user, Mode=OneTime, Converter={StaticResource userToSystemWarningVisibilityConverter}}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock <TextBlock x:Uid="ProcessIsSystemUserWarning" TextWrapping="Wrap" />
x:Uid="ProcessIsSystemUserWarning"
TextWrapping="Wrap" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</FontIcon> </FontIcon>
<Button <Button
MinWidth="128" MinWidth="128"
Command="{Binding Path=DataContext.EndTaskCommand, ElementName=ProcessesListView}" Command="{Binding Path=DataContext.EndTaskCommand, ElementName=ProcessesListView}"
CommandParameter="{Binding}"> CommandParameter="{Binding}">
<StackPanel <StackPanel Orientation="Horizontal" Spacing="8">
Orientation="Horizontal" <FontIcon FontSize="16" Glyph="&#xf140;" />
Spacing="8"> <TextBlock x:Uid="EndTask" />
<FontIcon
FontSize="16"
Glyph="&#xf140;" />
<TextBlock
x:Uid="EndTask"/>
</StackPanel> </StackPanel>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsExpander.Content> </tkControls:SettingsExpander.Content>
<labs:SettingsExpander.Items> <tkControls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="ProcessID"> <tkControls:SettingsCard x:Uid="ProcessID">
<TextBlock <TextBlock
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True" IsTextSelectionEnabled="True"
Text="{x:Bind pid}" /> Text="{x:Bind pid}" />
</labs:SettingsCard> </tkControls:SettingsCard>
<labs:SettingsCard x:Uid="User"> <tkControls:SettingsCard x:Uid="User">
<TextBlock <TextBlock
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True" IsTextSelectionEnabled="True"
Text="{x:Bind user}" /> Text="{x:Bind user}" />
</labs:SettingsCard> </tkControls:SettingsCard>
<labs:SettingsCard ContentAlignment="Vertical"> <tkControls:SettingsCard ContentAlignment="Vertical">
<labs:SettingsCard.Header> <tkControls:SettingsCard.Header>
<TextBlock> <TextBlock>
<Run x:Uid="Files" /> <Run x:Uid="Files" />
<Run Text="(" /><Run Text="{x:Bind files, Converter={StaticResource fileCountConverter}}" /><Run Text=")" /> <Run Text="(" /><Run Text="{x:Bind files, Converter={StaticResource fileCountConverter}}" /><Run Text=")" />
</TextBlock> </TextBlock>
</labs:SettingsCard.Header> </tkControls:SettingsCard.Header>
<ItemsRepeater <ItemsRepeater ItemsSource="{x:Bind files}">
ItemsSource="{x:Bind files}">
<ItemsRepeater.ItemTemplate> <ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="x:String"> <DataTemplate x:DataType="x:String">
<TextBlock <TextBlock
@ -179,9 +162,9 @@
</DataTemplate> </DataTemplate>
</ItemsRepeater.ItemTemplate> </ItemsRepeater.ItemTemplate>
</ItemsRepeater> </ItemsRepeater>
</labs:SettingsCard> </tkControls:SettingsCard>
</labs:SettingsExpander.Items> </tkControls:SettingsExpander.Items>
</labs:SettingsExpander> </tkControls:SettingsExpander>
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>
</ListView> </ListView>
@ -192,23 +175,17 @@
Orientation="Vertical" Orientation="Vertical"
Spacing="8" Spacing="8"
Visibility="{x:Bind ViewModel.Processes.Count, Mode=OneWay, Converter={StaticResource doubleToVisibilityConverter}}"> Visibility="{x:Bind ViewModel.Processes.Count, Mode=OneWay, Converter={StaticResource doubleToVisibilityConverter}}">
<Button <Button HorizontalAlignment="Center" Command="{Binding LoadProcessesCommand}">
HorizontalAlignment="Center"
Command="{Binding LoadProcessesCommand}">
<Button.Template> <Button.Template>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<FontIcon <FontIcon FontSize="32" Glyph="&#xE9F3;" />
FontSize="32"
Glyph="&#xE9F3;" />
</ControlTemplate> </ControlTemplate>
</Button.Template> </Button.Template>
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="Reload" /> <TextBlock x:Uid="Reload" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</Button> </Button>
<TextBlock <TextBlock x:Uid="EmptyListDescription" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
x:Uid="EmptyListDescription"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
</StackPanel> </StackPanel>
</Grid> </Grid>
<ProgressRing <ProgressRing
@ -217,14 +194,9 @@
IsActive="{x:Bind ViewModel.IsLoading, Mode=OneWay}" /> IsActive="{x:Bind ViewModel.IsLoading, Mode=OneWay}" />
</Grid> </Grid>
<ContentDialog <ContentDialog x:Name="SelectedFilesListDialog" x:Uid="SelectedFilesListDialog">
x:Name="SelectedFilesListDialog" <ScrollViewer Padding="0,0,16,0">
x:Uid="SelectedFilesListDialog"> <TextBlock IsTextSelectionEnabled="True" Text="{x:Bind ViewModel.PathsToString, Mode=OneWay}" />
<ScrollViewer
Padding="0,0,16,0">
<TextBlock
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.PathsToString, Mode=OneWay}" />
</ScrollViewer> </ScrollViewer>
</ContentDialog> </ContentDialog>
</Grid> </Grid>

View File

@ -0,0 +1,67 @@
// 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 Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
namespace Hosts.Helpers
{
// Taken from https://github.com/microsoft/microsoft-ui-xaml/blob/main/test/MUXControlsTestApp/Utilities/VisualTreeUtils.cs
// Original copyright header:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
public static class VisualTreeUtils
{
public static T FindVisualChildByType<T>(this DependencyObject element)
where T : DependencyObject
{
if (element == null)
{
return null;
}
if (element is T elementAsT)
{
return elementAsT;
}
int childrenCount = VisualTreeHelper.GetChildrenCount(element);
for (int i = 0; i < childrenCount; i++)
{
var result = VisualTreeHelper.GetChild(element, i).FindVisualChildByType<T>();
if (result != null)
{
return result;
}
}
return null;
}
public static FrameworkElement FindVisualChildByName(this DependencyObject element, string name)
{
if (element == null || string.IsNullOrWhiteSpace(name))
{
return null;
}
if (element is FrameworkElement elementAsFE && elementAsFE.Name == name)
{
return elementAsFE;
}
int childrenCount = VisualTreeHelper.GetChildrenCount(element);
for (int i = 0; i < childrenCount; i++)
{
var result = VisualTreeHelper.GetChild(element, i).FindVisualChildByName(name);
if (result != null)
{
return result;
}
}
return null;
}
}
}

View File

@ -57,7 +57,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" /> <PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="CommunityToolkit.Mvvm" /> <PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" /> <PackageReference Include="CommunityToolkit.WinUI.Converters" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" />
<PackageReference Include="CommunityToolkit.WinUI.Collections" />
<PackageReference Include="Microsoft.Extensions.Hosting" /> <PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Microsoft.WindowsAppSDK" /> <PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" />

View File

@ -2,7 +2,7 @@
x:Class="Hosts.Views.MainPage" x:Class="Hosts.Views.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Hosts.Helpers" xmlns:helpers="using:Hosts.Helpers"
xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:i="using:Microsoft.Xaml.Interactivity"
@ -10,6 +10,7 @@
xmlns:local="using:Hosts.Views" xmlns:local="using:Hosts.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="using:Hosts.Models" xmlns:models="using:Hosts.Models"
xmlns:ui="using:CommunityToolkit.WinUI"
x:Name="Page" x:Name="Page"
Loaded="Page_Loaded" Loaded="Page_Loaded"
mc:Ignorable="d"> mc:Ignorable="d">
@ -28,8 +29,8 @@
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" /> <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:BoolToVisibilityConverter <converters:BoolToVisibilityConverter
x:Key="BoolToInvertedVisibilityConverter" x:Key="BoolToInvertedVisibilityConverter"
TrueValue="Collapsed" FalseValue="Visible"
FalseValue="Visible" /> TrueValue="Collapsed" />
<converters:DoubleToVisibilityConverter <converters:DoubleToVisibilityConverter
x:Key="DoubleToVisibilityConverter" x:Key="DoubleToVisibilityConverter"
FalseValue="Visible" FalseValue="Visible"
@ -37,21 +38,17 @@
TrueValue="Collapsed" /> TrueValue="Collapsed" />
</Page.Resources> </Page.Resources>
<Grid <Grid Margin="16" RowSpacing="8">
Margin="16"
RowSpacing="8">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <!-- Buttons --> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <!-- Content --> <!-- Buttons -->
<RowDefinition Height="*" />
<!-- Content -->
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid>
<Grid> <!-- Buttons --> <!-- Buttons -->
<Button <Button x:Uid="AddEntryBtn" Command="{x:Bind NewDialogCommand}">
x:Uid="AddEntryBtn" <StackPanel Orientation="Horizontal" Spacing="8">
Command="{x:Bind NewDialogCommand}">
<StackPanel
Orientation="Horizontal"
Spacing="8">
<FontIcon <FontIcon
x:Name="Icon" x:Name="Icon"
FontSize="16" FontSize="16"
@ -60,9 +57,7 @@
<TextBlock x:Uid="AddEntry" /> <TextBlock x:Uid="AddEntry" />
</StackPanel> </StackPanel>
<Button.KeyboardAccelerators> <Button.KeyboardAccelerators>
<KeyboardAccelerator <KeyboardAccelerator Key="N" Modifiers="Control" />
Modifiers="Control"
Key="N" />
</Button.KeyboardAccelerators> </Button.KeyboardAccelerators>
</Button> </Button>
@ -74,19 +69,16 @@
x:Uid="AdditionalLinesBtn" x:Uid="AdditionalLinesBtn"
Height="32" Height="32"
Command="{x:Bind AdditionalLinesDialogCommand}" Command="{x:Bind AdditionalLinesDialogCommand}"
Style="{StaticResource SubtleButtonStyle}"> Content="{ui:FontIcon Glyph=&#xe8a5;,
<FontIcon FontSize=16}"
FontSize="16" Style="{StaticResource SubtleButtonStyle}" />
Glyph="&#xe8a5;" />
</Button>
<Button <Button
x:Uid="FilterBtn" x:Uid="FilterBtn"
Height="32" Height="32"
Content="{ui:FontIcon Glyph=&#xe71c;,
FontSize=16}"
Style="{StaticResource SubtleButtonStyle}"> Style="{StaticResource SubtleButtonStyle}">
<FontIcon
FontSize="16"
Glyph="&#xe71c;" />
<Button.Flyout> <Button.Flyout>
<Flyout> <Flyout>
<StackPanel <StackPanel
@ -124,15 +116,13 @@
</ic:EventTriggerBehavior> </ic:EventTriggerBehavior>
</i:Interaction.Behaviors> </i:Interaction.Behaviors>
</AutoSuggestBox> </AutoSuggestBox>
<ToggleSwitch <ToggleSwitch x:Uid="ShowOnlyDuplicates" IsOn="{x:Bind ViewModel.ShowOnlyDuplicates, Mode=TwoWay}" />
x:Uid="ShowOnlyDuplicates"
IsOn="{x:Bind ViewModel.ShowOnlyDuplicates, Mode=TwoWay}" />
<Button <Button
x:Uid="ClearFiltersBtn" x:Uid="ClearFiltersBtn"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Command="{x:Bind ViewModel.ClearFiltersCommand}" Command="{x:Bind ViewModel.ClearFiltersCommand}"
Style="{StaticResource AccentButtonStyle}" IsEnabled="{x:Bind ViewModel.Filtered, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.Filtered, Mode=OneWay}"/> Style="{StaticResource AccentButtonStyle}" />
</StackPanel> </StackPanel>
</Flyout> </Flyout>
</Button.Flyout> </Button.Flyout>
@ -142,21 +132,18 @@
x:Uid="OpenHostsFileBtn" x:Uid="OpenHostsFileBtn"
Height="32" Height="32"
Command="{x:Bind ViewModel.OpenHostsFileCommand}" Command="{x:Bind ViewModel.OpenHostsFileCommand}"
Style="{StaticResource SubtleButtonStyle}"> Content="{ui:FontIcon Glyph=&#xe8a7;,
<FontIcon FontSize=16}"
FontSize="16" Style="{StaticResource SubtleButtonStyle}" />
Glyph="&#xe8a7;" />
</Button>
<Button <Button
x:Uid="SettingsBtn" x:Uid="SettingsBtn"
Height="32" Height="32"
Command="{x:Bind ViewModel.OpenSettingsCommand}" Command="{x:Bind ViewModel.OpenSettingsCommand}"
Style="{StaticResource SubtleButtonStyle}"> Content="{ui:FontIcon Glyph=&#xe713;,
<FontIcon FontSize=16}"
FontSize="16" Style="{StaticResource SubtleButtonStyle}" />
Glyph="&#xe713;" />
</Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -166,9 +153,7 @@
CanDragItems="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}" CanDragItems="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
CanReorderItems="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}" CanReorderItems="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
--> -->
<Grid <Grid Grid.Row="1" Visibility="{x:Bind ViewModel.IsLoading, Converter={StaticResource BoolToInvertedVisibilityConverter}, Mode=OneWay}">
Grid.Row="1"
Visibility="{x:Bind ViewModel.IsLoading, Converter={StaticResource BoolToInvertedVisibilityConverter}, Mode=OneWay}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -181,9 +166,9 @@
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1" BorderThickness="1"
CornerRadius="{StaticResource OverlayCornerRadius}" CornerRadius="{StaticResource OverlayCornerRadius}"
GotFocus="Entries_GotFocus"
IsItemClickEnabled="True" IsItemClickEnabled="True"
ItemClick="Entries_ItemClick" ItemClick="Entries_ItemClick"
GotFocus="Entries_GotFocus"
RightTapped="Entries_RightTapped" RightTapped="Entries_RightTapped"
ItemsSource="{x:Bind ViewModel.Entries, Mode=TwoWay}" ItemsSource="{x:Bind ViewModel.Entries, Mode=TwoWay}"
SelectedItem="{x:Bind ViewModel.Selected, Mode=TwoWay}"> SelectedItem="{x:Bind ViewModel.Selected, Mode=TwoWay}">
@ -271,8 +256,8 @@
Height="20" Height="20"
IsActive="{x:Bind Pinging, Mode=OneWay}" /> IsActive="{x:Bind Pinging, Mode=OneWay}" />
<FontIcon <FontIcon
x:Uid="PingIcon"
x:Name="PingIcon" x:Name="PingIcon"
x:Uid="PingIcon"
Grid.Column="2" Grid.Column="2"
FontSize="16" FontSize="16"
Visibility="Collapsed"> Visibility="Collapsed">
@ -325,8 +310,8 @@
<FontIcon <FontIcon
x:Uid="DuplicateEntryIcon" x:Uid="DuplicateEntryIcon"
Grid.Column="3" Grid.Column="3"
Foreground="{StaticResource SystemControlErrorTextForegroundBrush}"
FontSize="16" FontSize="16"
Foreground="{StaticResource SystemControlErrorTextForegroundBrush}"
Glyph="&#xe7BA;" Glyph="&#xe7BA;"
Visibility="{x:Bind Duplicate, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> Visibility="{x:Bind Duplicate, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
<ToggleSwitch <ToggleSwitch
@ -352,14 +337,12 @@
VerticalAlignment="Center" VerticalAlignment="Center"
Spacing="8" Spacing="8"
Visibility="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}"> Visibility="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}">
<FontIcon <FontIcon FontSize="32" Glyph="&#xe774;" />
FontSize="32"
Glyph="&#xe774;" />
<TextBlock <TextBlock
x:Uid="EmptyHosts" x:Uid="EmptyHosts"
HorizontalAlignment="Center" HorizontalAlignment="Center"
TextWrapping="Wrap" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> TextWrapping="Wrap" />
<HyperlinkButton <HyperlinkButton
x:Uid="AddEntryLink" x:Uid="AddEntryLink"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@ -371,14 +354,12 @@
VerticalAlignment="Center" VerticalAlignment="Center"
Spacing="8" Spacing="8"
Visibility="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{x:Bind ViewModel.Filtered, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
<FontIcon <FontIcon FontSize="32" Glyph="&#xf78b;" />
FontSize="32"
Glyph="&#xf78b;" />
<TextBlock <TextBlock
x:Uid="EmptyFilterResults" x:Uid="EmptyFilterResults"
HorizontalAlignment="Center" HorizontalAlignment="Center"
TextWrapping="Wrap" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> TextWrapping="Wrap" />
<HyperlinkButton <HyperlinkButton
x:Uid="ClearFiltersLink" x:Uid="ClearFiltersLink"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@ -386,8 +367,7 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel <StackPanel Grid.Row="1">
Grid.Row="1">
<InfoBar <InfoBar
x:Uid="FileSaveError" x:Uid="FileSaveError"
Margin="0,8,0,0" Margin="0,8,0,0"
@ -395,31 +375,29 @@
Message="{x:Bind ViewModel.ErrorMessage, Mode=TwoWay}" Message="{x:Bind ViewModel.ErrorMessage, Mode=TwoWay}"
IsOpen="{x:Bind ViewModel.Error, Mode=TwoWay}" IsOpen="{x:Bind ViewModel.Error, Mode=TwoWay}"
Visibility="{x:Bind ViewModel.Error, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}" /> Visibility="{x:Bind ViewModel.Error, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}" />
<InfoBar <InfoBar
x:Uid="FileChanged" x:Uid="FileChanged"
Margin="0,8,0,0" Margin="0,8,0,0"
Severity="Informational"
IsOpen="{x:Bind ViewModel.FileChanged, Mode=TwoWay}" IsOpen="{x:Bind ViewModel.FileChanged, Mode=TwoWay}"
Severity="Informational"
Visibility="{x:Bind ViewModel.FileChanged, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{x:Bind ViewModel.FileChanged, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}">
<InfoBar.ActionButton> <InfoBar.ActionButton>
<Button <Button x:Uid="Reload" Command="{x:Bind ViewModel.ReadHostsCommand}" />
x:Uid="Reload"
Command="{x:Bind ViewModel.ReadHostsCommand}" />
</InfoBar.ActionButton> </InfoBar.ActionButton>
</InfoBar> </InfoBar>
</StackPanel> </StackPanel>
</Grid> </Grid>
<ProgressRing <ProgressRing
Grid.Row="1"
Width="48" Width="48"
Height="48" Height="48"
Grid.Row="1"
IsActive="{x:Bind ViewModel.IsLoading, Mode=OneWay}" /> IsActive="{x:Bind ViewModel.IsLoading, Mode=OneWay}" />
<ContentDialog <ContentDialog
x:Name="EntryDialog" x:Name="EntryDialog"
x:Uid="EntryDialog" x:Uid="EntryDialog"
Loaded="ContentDialog_Loaded_ApplyMargin"
IsPrimaryButtonEnabled="{Binding Valid, Mode=OneWay}" IsPrimaryButtonEnabled="{Binding Valid, Mode=OneWay}"
PrimaryButtonStyle="{StaticResource AccentButtonStyle}"> PrimaryButtonStyle="{StaticResource AccentButtonStyle}">
<ContentDialog.DataContext> <ContentDialog.DataContext>
@ -436,22 +414,22 @@
Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBox <TextBox
x:Uid="Hosts" x:Uid="Hosts"
IsSpellCheckEnabled="False"
AcceptsReturn="False" AcceptsReturn="False"
TextWrapping="Wrap" IsSpellCheckEnabled="False"
ScrollViewer.IsVerticalRailEnabled="True" ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{Binding Hosts, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> Text="{Binding Hosts, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
<TextBox <TextBox
x:Uid="Comment" x:Uid="Comment"
IsSpellCheckEnabled="False"
AcceptsReturn="False" AcceptsReturn="False"
TextWrapping="Wrap" IsSpellCheckEnabled="False"
ScrollViewer.IsVerticalRailEnabled="True" ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{Binding Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> Text="{Binding Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
<ToggleSwitch <ToggleSwitch
x:Uid="Active" x:Uid="Active"
IsOn="{Binding Active, Mode=TwoWay}" IsOn="{Binding Active, Mode=TwoWay}"
@ -472,14 +450,15 @@
<ContentDialog <ContentDialog
x:Name="AdditionalLinesDialog" x:Name="AdditionalLinesDialog"
x:Uid="AdditionalLinesDialog" x:Uid="AdditionalLinesDialog"
Loaded="ContentDialog_Loaded_ApplyMargin"
PrimaryButtonCommand="{x:Bind UpdateAdditionalLinesCommand}" PrimaryButtonCommand="{x:Bind UpdateAdditionalLinesCommand}"
PrimaryButtonStyle="{StaticResource AccentButtonStyle}"> PrimaryButtonStyle="{StaticResource AccentButtonStyle}">
<TextBox <TextBox
x:Name="AdditionalLines" x:Name="AdditionalLines"
HorizontalAlignment="Stretch"
MinHeight="40" MinHeight="40"
Padding="16,0" Padding="16,0"
HorizontalAlignment="Stretch"
AcceptsReturn="True" AcceptsReturn="True"
ScrollViewer.IsVerticalRailEnabled="True" ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"
@ -489,15 +468,12 @@
<TeachingTip <TeachingTip
x:Uid="TooManyHostsTeachingTip" x:Uid="TooManyHostsTeachingTip"
IconSource="{ui:FontIconSource Glyph=&#xe946;}"
IsOpen="{x:Bind ViewModel.ShowSplittedEntriesTooltip, Mode=OneWay}" IsOpen="{x:Bind ViewModel.ShowSplittedEntriesTooltip, Mode=OneWay}"
PreferredPlacement="Top" PlacementMargin="20"
PlacementMargin="20"> PreferredPlacement="Top">
<TeachingTip.IconSource>
<FontIconSource Glyph="&#xe946;" />
</TeachingTip.IconSource>
<TeachingTip.Content> <TeachingTip.Content>
<TextBlock x:Uid="TooManyHostsTeachingTipContent" <TextBlock x:Uid="TooManyHostsTeachingTipContent" TextWrapping="Wrap" />
TextWrapping="Wrap"/>
</TeachingTip.Content> </TeachingTip.Content>
</TeachingTip> </TeachingTip>
</Grid> </Grid>

View File

@ -6,9 +6,11 @@ using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Input;
using Hosts.Helpers;
using Hosts.Models; using Hosts.Models;
using Hosts.Settings; using Hosts.Settings;
using Hosts.ViewModels; using Hosts.ViewModels;
using ManagedCommon;
using Microsoft.UI.Xaml; using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Input;
@ -186,5 +188,19 @@ namespace Hosts.Views
var entry = (e.OriginalSource as FrameworkElement).DataContext as Entry; var entry = (e.OriginalSource as FrameworkElement).DataContext as Entry;
ViewModel.Selected = entry; ViewModel.Selected = entry;
} }
private void ContentDialog_Loaded_ApplyMargin(object sender, RoutedEventArgs e)
{
try
{
// Based on the template from dev/CommonStyles/ContentDialog_themeresources.xaml in https://github.com/microsoft/microsoft-ui-xaml
var border = VisualTreeUtils.FindVisualChildByName(sender as ContentDialog, "BackgroundElement") as Border;
border.Margin = new Thickness(0, 32, 0, 0); // Should be the size reserved for the title bar as in MainWindow.xaml
}
catch (Exception ex)
{
Logger.LogError("Couldn't set the margin for a content dialog. It will appear on top of the title bar.", ex);
}
}
} }
} }

View File

@ -14,7 +14,7 @@ using Common.UI;
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.WinUI; using CommunityToolkit.WinUI;
using CommunityToolkit.WinUI.UI; using CommunityToolkit.WinUI.Collections;
using Hosts.Helpers; using Hosts.Helpers;
using Hosts.Models; using Hosts.Models;
using Hosts.Settings; using Hosts.Settings;

View File

@ -97,36 +97,53 @@ namespace Wox.Infrastructure.Image
private static IntPtr GetHBitmap(string fileName, int width, int height, ThumbnailOptions options) private static IntPtr GetHBitmap(string fileName, int width, int height, ThumbnailOptions options)
{ {
Guid shellItem2Guid = new Guid(IShellItem2Guid); IntPtr hBitmap = IntPtr.Zero;
int retCode = NativeMethods.SHCreateItemFromParsingName(fileName, IntPtr.Zero, ref shellItem2Guid, out IShellItem nativeShellItem); IShellItem nativeShellItem = null;
if (retCode != 0) try
{ {
throw Marshal.GetExceptionForHR(retCode); Guid shellItem2Guid = new Guid(IShellItem2Guid);
} int retCode = NativeMethods.SHCreateItemFromParsingName(fileName, IntPtr.Zero, ref shellItem2Guid, out nativeShellItem);
NativeSize nativeSize = new NativeSize if (retCode != 0)
{ {
Width = width, Log.Error($"Error while creating item. retCode:{retCode} ", MethodBase.GetCurrentMethod().DeclaringType);
Height = height, throw Marshal.GetExceptionForHR(retCode);
}; }
HResult hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, options, out IntPtr hBitmap); NativeSize nativeSize = new NativeSize
{
Width = width,
Height = height,
};
HResult hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, options, out hBitmap);
// if extracting image thumbnail and failed, extract shell icon // if extracting image thumbnail and failed, extract shell icon
if (options == ThumbnailOptions.ThumbnailOnly && hr == HResult.ExtractionFailed) if (options == ThumbnailOptions.ThumbnailOnly && hr == HResult.ExtractionFailed)
{ {
hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, ThumbnailOptions.IconOnly, out hBitmap); hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, ThumbnailOptions.IconOnly, out hBitmap);
} }
Marshal.ReleaseComObject(nativeShellItem); if (hr != HResult.Ok)
{
throw Marshal.GetExceptionForHR((int)hr);
}
if (hr == HResult.Ok)
{
return hBitmap; return hBitmap;
} }
catch (System.Exception ex)
throw new InvalidComObjectException($"Error while extracting thumbnail for {fileName}", Marshal.GetExceptionForHR((int)hr)); {
Log.Exception($"Error while extracting thumbnail for {fileName}", ex, MethodBase.GetCurrentMethod().DeclaringType);
throw;
}
finally
{
if (nativeShellItem != null)
{
Marshal.ReleaseComObject(nativeShellItem);
}
}
} }
private static bool logReportedAdobeReaderDetected; // Keep track if Adobe Reader detection has been logged yet. private static bool logReportedAdobeReaderDetected; // Keep track if Adobe Reader detection has been logged yet.

View File

@ -62,7 +62,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" /> <PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" /> <PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="Microsoft.WindowsAppSDK" /> <PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="WinUIEx" /> <PackageReference Include="WinUIEx" />

View File

@ -5,10 +5,12 @@
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sizers="using:CommunityToolkit.WinUI.Controls"
xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:winuiex="using:WinUIEx" xmlns:winuiex="using:WinUIEx"
Closed="Window_Closed"
MinWidth="480" MinWidth="480"
MinHeight="320" MinHeight="320"
Closed="Window_Closed"
mc:Ignorable="d"> mc:Ignorable="d">
<Window.SystemBackdrop> <Window.SystemBackdrop>
<MicaBackdrop /> <MicaBackdrop />
@ -23,21 +25,21 @@
x:Name="titleBar" x:Name="titleBar"
Grid.Row="0" Grid.Row="0"
Height="32" Height="32"
ColumnSpacing="16"
Margin="16,0" Margin="16,0"
ColumnSpacing="16"
IsHitTestVisible="True"> IsHitTestVisible="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<!--<ColumnDefinition x:Name="LeftPaddingColumn" Width="0"/>--> <!--<ColumnDefinition x:Name="LeftPaddingColumn" Width="0"/>-->
<ColumnDefinition x:Name="IconColumn" Width="Auto"/> <ColumnDefinition x:Name="IconColumn" Width="Auto" />
<ColumnDefinition x:Name="TitleColumn" Width="Auto"/> <ColumnDefinition x:Name="TitleColumn" Width="Auto" />
<!--<ColumnDefinition x:Name="RightPaddingColumn" Width="0"/>--> <!--<ColumnDefinition x:Name="RightPaddingColumn" Width="0"/>-->
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image <Image
Source="../Assets/RegistryPreview/app.ico"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"
Width="16" Width="16"
Height="16"/> Height="16"
VerticalAlignment="Center"
Source="../Assets/RegistryPreview/app.ico" />
<TextBlock <TextBlock
x:Name="titleBarText" x:Name="titleBarText"
Grid.Column="1" Grid.Column="1"
@ -51,17 +53,17 @@
Grid.Row="1" Grid.Row="1"
Width="Auto" Width="Auto"
Height="Auto" Height="Auto"
Margin="12"
x:FieldModifier="public" x:FieldModifier="public"
Loaded="GridPreview_Loaded" Loaded="GridPreview_Loaded"
TabFocusNavigation="Cycle" TabFocusNavigation="Cycle">
Margin="12">
<Grid.Resources> <Grid.Resources>
<Style x:Key="GridCardStyle" TargetType="Border"> <Style x:Key="GridCardStyle" TargetType="Border">
<Style.Setters> <Style.Setters>
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" /> <Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" /> <Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
<Setter Property="CornerRadius" Value="{StaticResource OverlayCornerRadius}"/> <Setter Property="CornerRadius" Value="{StaticResource OverlayCornerRadius}" />
</Style.Setters> </Style.Setters>
</Style> </Style>
</Grid.Resources> </Grid.Resources>
@ -79,11 +81,12 @@
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border Style="{StaticResource GridCardStyle}" <Border
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Margin="0,0,0,12"> Margin="0,0,0,12"
Style="{StaticResource GridCardStyle}">
<CommandBar <CommandBar
Name="commandBar" Name="commandBar"
@ -91,60 +94,50 @@
DefaultLabelPosition="Right"> DefaultLabelPosition="Right">
<AppBarButton <AppBarButton
x:Name="openButton" x:Name="openButton"
x:Uid="OpenButton" x:Uid="OpenButton"
Click="OpenButton_Click"> Click="OpenButton_Click"
<AppBarButton.Icon> Icon="{ui:FontIcon Glyph=&#xe8e5;}">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe8e5;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="O" Modifiers="Control" /> <KeyboardAccelerator Key="O" Modifiers="Control" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
</AppBarButton> </AppBarButton>
<AppBarButton <AppBarButton
x:Name="refreshButton" x:Name="refreshButton"
x:Uid="RefreshButton" x:Uid="RefreshButton"
Click="RefreshButton_Click"> Click="RefreshButton_Click"
<AppBarButton.Icon> Icon="{ui:FontIcon Glyph=&#xe72c;}">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe72c;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="F5" /> <KeyboardAccelerator Key="F5" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
</AppBarButton> </AppBarButton>
<AppBarSeparator /> <AppBarSeparator />
<AppBarButton <AppBarButton
x:Name="saveButton" x:Name="saveButton"
x:Uid="SaveButton" x:Uid="SaveButton"
Click="SaveButton_Click" Click="SaveButton_Click"
IsEnabled="False"> Icon="{ui:FontIcon Glyph=&#xe74e;}"
<AppBarButton.Icon> IsEnabled="False">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe74e;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="S" Modifiers="Control" /> <KeyboardAccelerator Key="S" Modifiers="Control" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
</AppBarButton> </AppBarButton>
<AppBarButton <AppBarButton
x:Name="saveAsButton" x:Name="saveAsButton"
x:Uid="SaveAsButton" x:Uid="SaveAsButton"
Click="SaveAsButton_Click" Click="SaveAsButton_Click"
IsEnabled="True"> Icon="{ui:FontIcon Glyph=&#xe792;}"
<AppBarButton.Icon> IsEnabled="True">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe792;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="S" Modifiers="Control,Shift" /> <KeyboardAccelerator Key="S" Modifiers="Control,Shift" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
</AppBarButton> </AppBarButton>
<AppBarSeparator /> <AppBarSeparator />
<AppBarButton <AppBarButton
x:Name="editButton" x:Name="editButton"
x:Uid="EditButton" x:Uid="EditButton"
Click="EditButton_Click"> Click="EditButton_Click"
<AppBarButton.Icon> Icon="{ui:FontIcon Glyph=&#xe8a7;}">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe8a7;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="E" Modifiers="Control" /> <KeyboardAccelerator Key="E" Modifiers="Control" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
@ -152,10 +145,8 @@
<AppBarButton <AppBarButton
x:Name="writeButton" x:Name="writeButton"
x:Uid="WriteButton" x:Uid="WriteButton"
Click="WriteButton_Click"> Click="WriteButton_Click"
<AppBarButton.Icon> Icon="{ui:FontIcon Glyph=&#xe72d;}">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe72d;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="W" Modifiers="Control" /> <KeyboardAccelerator Key="W" Modifiers="Control" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
@ -163,10 +154,8 @@
<AppBarButton <AppBarButton
x:Name="registryButton" x:Name="registryButton"
x:Uid="RegistryButton" x:Uid="RegistryButton"
Click="RegistryButton_Click"> Click="RegistryButton_Click"
<AppBarButton.Icon> Icon="{ui:FontIcon Glyph=&#xe8ad;}">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe8ad;"/>
</AppBarButton.Icon>
<AppBarButton.KeyboardAccelerators> <AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="R" Modifiers="Control" /> <KeyboardAccelerator Key="R" Modifiers="Control" />
</AppBarButton.KeyboardAccelerators> </AppBarButton.KeyboardAccelerators>
@ -193,6 +182,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
AcceptsReturn="True" AcceptsReturn="True"
CanBeScrollAnchor="False" CanBeScrollAnchor="False"
CornerRadius="{StaticResource OverlayCornerRadius}"
FontFamily="Cascadia Mono, Consolas, Courier New" FontFamily="Cascadia Mono, Consolas, Courier New"
IsSpellCheckEnabled="False" IsSpellCheckEnabled="False"
IsTabStop="True" IsTabStop="True"
@ -203,13 +193,12 @@
ScrollViewer.IsVerticalRailEnabled="True" ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"
TabIndex="0" TabIndex="0"
TextWrapping="NoWrap" TextWrapping="NoWrap" />
CornerRadius="{StaticResource OverlayCornerRadius}"
/>
<Border Style="{StaticResource GridCardStyle}" <Border
Grid.Row="1"
Grid.Column="2" Grid.Column="2"
Grid.Row="1"> Style="{StaticResource GridCardStyle}">
<TreeView <TreeView
x:Name="treeView" x:Name="treeView"
AllowDrop="False" AllowDrop="False"
@ -244,9 +233,10 @@
</TreeView> </TreeView>
</Border> </Border>
<Border Style="{StaticResource GridCardStyle}" <Border
Grid.Row="3" Grid.Row="3"
Grid.Column="2"> Grid.Column="2"
Style="{StaticResource GridCardStyle}">
<controls:DataGrid <controls:DataGrid
x:Name="dataGrid" x:Name="dataGrid"
AllowDrop="False" AllowDrop="False"
@ -267,8 +257,11 @@
IsReadOnly="True"> IsReadOnly="True">
<controls:DataGridTemplateColumn.CellTemplate> <controls:DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" <StackPanel
Margin="4" Spacing="8"> Margin="4"
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="8">
<Image <Image
MaxWidth="16" MaxWidth="16"
MaxHeight="16" MaxHeight="16"
@ -277,8 +270,8 @@
ToolTipService.ToolTip="{Binding ToolTipText}" /> ToolTipService.ToolTip="{Binding ToolTipText}" />
<TextBlock <TextBlock
IsTabStop="False" IsTabStop="False"
Text="{Binding Name}" Style="{StaticResource CaptionTextBlockStyle}"
Style="{StaticResource CaptionTextBlockStyle}"/> Text="{Binding Name}" />
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</controls:DataGridTemplateColumn.CellTemplate> </controls:DataGridTemplateColumn.CellTemplate>
@ -297,26 +290,20 @@
</controls:DataGrid> </controls:DataGrid>
</Border> </Border>
<controls:GridSplitter <sizers:GridSplitter
x:Name="verticalSplitter" x:Name="verticalSplitter"
Grid.Row="1" Grid.Row="1"
Grid.RowSpan="3" Grid.RowSpan="3"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="Transparent"
CursorBehavior="ChangeOnSplitterHover"
GripperCursor="SizeWestEast"
IsTabStop="False" /> IsTabStop="False" />
<controls:GridSplitter <sizers:GridSplitter
x:Name="horizontalSplitter" x:Name="horizontalSplitter"
Grid.Row="2" Grid.Row="2"
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
CursorBehavior="ChangeOnSplitterHover"
GripperCursor="SizeNorthSouth"
IsTabStop="False" /> IsTabStop="False" />
</Grid> </Grid>
</Grid> </Grid>

33
src/runner/bug_report.cpp Normal file
View File

@ -0,0 +1,33 @@
#include "pch.h"
#include "bug_report.h"
#include "Generated files/resource.h"
#include <common/utils/process_path.h>
#include <common/utils/resources.h>
std::atomic_bool isBugReportThreadRunning = false;
void launch_bug_report() noexcept
{
std::wstring bug_report_path = get_module_folderpath();
bug_report_path += L"\\Tools\\PowerToys.BugReportTool.exe";
bool expected_isBugReportThreadRunning = false;
if (isBugReportThreadRunning.compare_exchange_strong(expected_isBugReportThreadRunning, true))
{
std::thread([bug_report_path]() {
SHELLEXECUTEINFOW sei{ sizeof(sei) };
sei.fMask = { SEE_MASK_FLAG_NO_UI | SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE };
sei.lpFile = bug_report_path.c_str();
sei.nShow = SW_HIDE;
if (ShellExecuteExW(&sei))
{
WaitForSingleObject(sei.hProcess, INFINITE);
CloseHandle(sei.hProcess);
static const std::wstring bugreport_success = GET_RESOURCE_STRING(IDS_BUGREPORT_SUCCESS);
MessageBoxW(nullptr, bugreport_success.c_str(), L"PowerToys", MB_OK);
}
isBugReportThreadRunning.store(false);
}).detach();
}
}

3
src/runner/bug_report.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
void launch_bug_report() noexcept;

View File

@ -48,6 +48,7 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="..\common\interop\two_way_pipe_message_ipc.cpp" /> <ClCompile Include="..\common\interop\two_way_pipe_message_ipc.cpp" />
<ClCompile Include="auto_start_helper.cpp" /> <ClCompile Include="auto_start_helper.cpp" />
<ClCompile Include="bug_report.cpp" />
<ClCompile Include="centralized_hotkeys.cpp" /> <ClCompile Include="centralized_hotkeys.cpp" />
<ClCompile Include="general_settings.cpp" /> <ClCompile Include="general_settings.cpp" />
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">
@ -67,6 +68,7 @@
<ItemGroup> <ItemGroup>
<ClInclude Include="ActionRunnerUtils.h" /> <ClInclude Include="ActionRunnerUtils.h" />
<ClInclude Include="auto_start_helper.h" /> <ClInclude Include="auto_start_helper.h" />
<ClInclude Include="bug_report.h" />
<ClInclude Include="centralized_hotkeys.h" /> <ClInclude Include="centralized_hotkeys.h" />
<ClInclude Include="general_settings.h" /> <ClInclude Include="general_settings.h" />
<ClInclude Include="pch.h" /> <ClInclude Include="pch.h" />

View File

@ -42,6 +42,9 @@
<ClCompile Include="centralized_hotkeys.cpp"> <ClCompile Include="centralized_hotkeys.cpp">
<Filter>Utils</Filter> <Filter>Utils</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="bug_report.cpp">
<Filter>Utils</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="pch.h" /> <ClInclude Include="pch.h" />
@ -87,6 +90,9 @@
<ClInclude Include="centralized_hotkeys.h"> <ClInclude Include="centralized_hotkeys.h">
<Filter>Utils</Filter> <Filter>Utils</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="bug_report.h">
<Filter>Utils</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Filter Include="Utils"> <Filter Include="Utils">

View File

@ -26,6 +26,7 @@
#include <common/updating/updateState.h> #include <common/updating/updateState.h>
#include <common/themes/windows_colors.h> #include <common/themes/windows_colors.h>
#include "settings_window.h" #include "settings_window.h"
#include "bug_report.h"
#define BUFSIZE 1024 #define BUFSIZE 1024
@ -108,7 +109,7 @@ std::optional<std::wstring> dispatch_json_action_to_module(const json::JsonObjec
else if (action == L"check_for_updates") else if (action == L"check_for_updates")
{ {
bool expected_isUpdateCheckThreadRunning = false; bool expected_isUpdateCheckThreadRunning = false;
if (isUpdateCheckThreadRunning.compare_exchange_strong(expected_isUpdateCheckThreadRunning,true)) if (isUpdateCheckThreadRunning.compare_exchange_strong(expected_isUpdateCheckThreadRunning, true))
{ {
std::thread([]() { std::thread([]() {
CheckForUpdatesCallback(); CheckForUpdatesCallback();
@ -222,19 +223,7 @@ void dispatch_received_json(const std::wstring& json_to_parse)
} }
else if (name == L"bugreport") else if (name == L"bugreport")
{ {
std::wstring bug_report_path = get_module_folderpath(); launch_bug_report();
bug_report_path += L"\\Tools\\PowerToys.BugReportTool.exe";
SHELLEXECUTEINFOW sei{ sizeof(sei) };
sei.fMask = { SEE_MASK_FLAG_NO_UI | SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE };
sei.lpFile = bug_report_path.c_str();
sei.nShow = SW_HIDE;
if (ShellExecuteExW(&sei))
{
WaitForSingleObject(sei.hProcess, INFINITE);
CloseHandle(sei.hProcess);
static const std::wstring bugreport_success = GET_RESOURCE_STRING(IDS_BUGREPORT_SUCCESS);
MessageBoxW(nullptr, bugreport_success.c_str(), L"PowerToys", MB_OK);
}
} }
else if (name == L"killrunner") else if (name == L"killrunner")
{ {
@ -410,18 +399,18 @@ void run_settings_window(bool show_oobe_window, bool show_scoobe_window, std::op
PTSettingsHelper::save_general_settings(save_settings.to_json()); PTSettingsHelper::save_general_settings(save_settings.to_json());
std::wstring executable_args = fmt::format(L"\"{}\" {} {} {} {} {} {} {} {} {} {} {}", std::wstring executable_args = fmt::format(L"\"{}\" {} {} {} {} {} {} {} {} {} {} {}",
executable_path, executable_path,
powertoys_pipe_name, powertoys_pipe_name,
settings_pipe_name, settings_pipe_name,
std::to_wstring(powertoys_pid), std::to_wstring(powertoys_pid),
settings_theme, settings_theme,
settings_elevatedStatus, settings_elevatedStatus,
settings_isUserAnAdmin, settings_isUserAnAdmin,
settings_showOobe, settings_showOobe,
settings_showScoobe, settings_showScoobe,
settings_showFlyout, settings_showFlyout,
settings_containsSettingsWindow, settings_containsSettingsWindow,
settings_containsFlyoutPosition); settings_containsFlyoutPosition);
if (settings_window.has_value()) if (settings_window.has_value())
{ {

View File

@ -6,17 +6,18 @@
#include "centralized_kb_hook.h" #include "centralized_kb_hook.h"
#include <Windows.h> #include <Windows.h>
#include <common/utils/process_path.h>
#include <common/utils/resources.h> #include <common/utils/resources.h>
#include <common/version/version.h> #include <common/version/version.h>
#include <common/logger/logger.h> #include <common/logger/logger.h>
#include <common/utils/elevation.h> #include <common/utils/elevation.h>
#include "bug_report.h"
namespace namespace
{ {
HWND tray_icon_hwnd = NULL; HWND tray_icon_hwnd = NULL;
enum { enum
{
wm_icon_notify = WM_APP, wm_icon_notify = WM_APP,
wm_run_on_main_ui_thread, wm_run_on_main_ui_thread,
}; };
@ -44,8 +45,6 @@ struct run_on_main_ui_thread_msg
PVOID data; PVOID data;
}; };
std::atomic_bool isBugReportThreadRunning = false;
bool dispatch_run_on_main_ui_thread(main_loop_callback_function _callback, PVOID data) bool dispatch_run_on_main_ui_thread(main_loop_callback_function _callback, PVOID data)
{ {
if (tray_icon_hwnd == NULL) if (tray_icon_hwnd == NULL)
@ -74,11 +73,11 @@ void handle_tray_command(HWND window, const WPARAM command_id, LPARAM lparam)
switch (command_id) switch (command_id)
{ {
case ID_SETTINGS_MENU_COMMAND: case ID_SETTINGS_MENU_COMMAND:
{ {
std::wstring settings_window{ winrt::to_hstring(ESettingsWindowNames_to_string(static_cast<ESettingsWindowNames>(lparam))) }; std::wstring settings_window{ winrt::to_hstring(ESettingsWindowNames_to_string(static_cast<ESettingsWindowNames>(lparam))) };
open_settings_window(settings_window, false); open_settings_window(settings_window, false);
} }
break; break;
case ID_EXIT_MENU_COMMAND: case ID_EXIT_MENU_COMMAND:
if (h_menu) if (h_menu)
{ {
@ -97,29 +96,7 @@ void handle_tray_command(HWND window, const WPARAM command_id, LPARAM lparam)
break; break;
case ID_REPORT_BUG_COMMAND: case ID_REPORT_BUG_COMMAND:
{ {
std::wstring bug_report_path = get_module_folderpath(); launch_bug_report();
bug_report_path += L"\\Tools\\PowerToys.BugReportTool.exe";
bool expected_isBugReportThreadRunning = false;
if (isBugReportThreadRunning.compare_exchange_strong(expected_isBugReportThreadRunning, true))
{
std::thread([bug_report_path]() {
SHELLEXECUTEINFOW sei{ sizeof(sei) };
sei.fMask = { SEE_MASK_FLAG_NO_UI | SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE };
sei.lpFile = bug_report_path.c_str();
sei.nShow = SW_HIDE;
if (ShellExecuteExW(&sei))
{
WaitForSingleObject(sei.hProcess, INFINITE);
CloseHandle(sei.hProcess);
static const std::wstring bugreport_success = GET_RESOURCE_STRING(IDS_BUGREPORT_SUCCESS);
MessageBoxW(nullptr, bugreport_success.c_str(), L"PowerToys", MB_OK);
}
isBugReportThreadRunning.store(false);
}).detach();
}
break; break;
} }

View File

@ -1,29 +0,0 @@
// 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.Globalization;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;
namespace Microsoft.PowerToys.Settings.UI.Converters
{
public class NegativeBoolToVisibilityConverter : IValueConverter
{
object IValueConverter.Convert(object value, Type targetType, object parameter, string language)
{
if ((bool)value)
{
return Visibility.Collapsed;
}
return Visibility.Visible;
}
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}

View File

@ -1,24 +0,0 @@
// 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;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;
namespace Microsoft.PowerToys.Settings.UI.Converters
{
public class VisibleIfNotEmptyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return value == null || (value as IList).Count == 0 ? Visibility.Collapsed : Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
return null;
}
}
}

View File

@ -77,11 +77,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CommunityToolkit.Labs.WinUI.SettingsControls" /> <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Animations" /> <PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" />
<PackageReference Include="CommunityToolkit.WinUI.Animations" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Markdown" />
<PackageReference Include="Microsoft.Windows.CsWinRT" /> <PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="CommunityToolkit.WinUI.UI" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" />
<PackageReference Include="WinUIEx" /> <PackageReference Include="WinUIEx" />
<PackageReference Include="Microsoft.WindowsAppSDK" /> <PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" />

View File

@ -3,9 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters">
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:local="using:Microsoft.PowerToys.Settings.UI">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

View File

@ -2,11 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using CommunityToolkit.Labs.WinUI;
using Microsoft.UI.Xaml; using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using WinUIEx;
namespace Microsoft.PowerToys.Settings.UI.Controls namespace Microsoft.PowerToys.Settings.UI.Controls
{ {

View File

@ -2,7 +2,7 @@
x:Class="Microsoft.PowerToys.Settings.UI.Controls.PowerAccentShortcutControl" x:Class="Microsoft.PowerToys.Settings.UI.Controls.PowerAccentShortcutControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
@ -29,7 +29,7 @@
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<controls:KeyVisual <custom:KeyVisual
VerticalAlignment="Center" VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw" AutomationProperties.AccessibilityView="Raw"
Content="{Binding}" Content="{Binding}"

View File

@ -2,8 +2,8 @@
x:Class="Microsoft.PowerToys.Settings.UI.Controls.SettingsPageControl" x:Class="Microsoft.PowerToys.Settings.UI.Controls.SettingsPageControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls" xmlns:custom="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -109,7 +109,7 @@
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<controls:WrapPanel HorizontalSpacing="24" Orientation="Horizontal" /> <custom:WrapPanel HorizontalSpacing="24" Orientation="Horizontal" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
@ -150,7 +150,7 @@
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<controls:WrapPanel HorizontalSpacing="24" Orientation="Horizontal" /> <custom:WrapPanel HorizontalSpacing="24" Orientation="Horizontal" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>

View File

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System; using System;
using CommunityToolkit.WinUI.UI; using CommunityToolkit.WinUI;
using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.UI.Xaml; using Microsoft.UI.Xaml;

View File

@ -2,7 +2,7 @@
x:Class="Microsoft.PowerToys.Settings.UI.Controls.ShortcutWithTextLabelControl" x:Class="Microsoft.PowerToys.Settings.UI.Controls.ShortcutWithTextLabelControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -30,7 +30,7 @@
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<controls:KeyVisual <custom:KeyVisual
VerticalAlignment="Center" VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw" AutomationProperties.AccessibilityView="Raw"
Content="{Binding}" Content="{Binding}"

View File

@ -3,11 +3,12 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Flyout" xmlns:local="using:Microsoft.PowerToys.Settings.UI.Flyout"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitControls="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitControls="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels" xmlns:viewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
@ -37,14 +38,14 @@
<Grid Padding="36,32,36,0"> <Grid Padding="36,32,36,0">
<TextBlock <TextBlock
x:Uid="ShortcutsTxt"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource BodyStrongTextBlockStyle}" Style="{StaticResource BodyStrongTextBlockStyle}" />
x:Uid="ShortcutsTxt" />
<Button <Button
x:Uid="MoreBtn"
Padding="8,4,8,4" Padding="8,4,8,4"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
x:Uid="MoreBtn"
Click="AllAppButton_Click"> Click="AllAppButton_Click">
<Button.Content> <Button.Content>
<StackPanel <StackPanel
@ -52,7 +53,7 @@
Orientation="Horizontal" Orientation="Horizontal"
Spacing="12"> Spacing="12">
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" x:Uid="MoreLabel" /> <TextBlock x:Uid="MoreLabel" Style="{StaticResource CaptionTextBlockStyle}" />
<FontIcon <FontIcon
Margin="0,2,0,0" Margin="0,2,0,0"
FontSize="12" FontSize="12"
@ -75,27 +76,27 @@
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:FlyoutMenuItem"> <DataTemplate x:DataType="viewModels:FlyoutMenuItem">
<controls:FlyoutMenuButton <custom:FlyoutMenuButton
AutomationProperties.Name="{x:Bind Label}"
Click="ModuleButton_Click" Click="ModuleButton_Click"
Tag="{x:Bind Tag}" Tag="{x:Bind Tag}"
AutomationProperties.Name="{x:Bind Label}"
ToolTipService.ToolTip="{x:Bind ToolTip}" ToolTipService.ToolTip="{x:Bind ToolTip}"
Visibility="{x:Bind Visible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{x:Bind Visible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}}">
<controls:FlyoutMenuButton.Content> <custom:FlyoutMenuButton.Content>
<TextBlock <TextBlock
Style="{StaticResource CaptionTextBlockStyle}" Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind Label}" Text="{x:Bind Label}"
TextAlignment="Center" TextAlignment="Center"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</controls:FlyoutMenuButton.Content> </custom:FlyoutMenuButton.Content>
<controls:FlyoutMenuButton.Icon> <custom:FlyoutMenuButton.Icon>
<Image> <Image>
<Image.Source> <Image.Source>
<BitmapImage UriSource="{x:Bind Icon, Mode=OneWay}" /> <BitmapImage UriSource="{x:Bind Icon, Mode=OneWay}" />
</Image.Source> </Image.Source>
</Image> </Image>
</controls:FlyoutMenuButton.Icon> </custom:FlyoutMenuButton.Icon>
</controls:FlyoutMenuButton> </custom:FlyoutMenuButton>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
@ -118,30 +119,32 @@
x:Name="DocsBtn" x:Name="DocsBtn"
x:Uid="DocsBtn" x:Uid="DocsBtn"
Click="DocsBtn_Click" Click="DocsBtn_Click"
Content="{ui:FontIcon Glyph=&#xE8A5;,
FontSize=16}"
Style="{StaticResource FlyoutButtonStyle}"> Style="{StaticResource FlyoutButtonStyle}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="DocsTooltip"/> <TextBlock x:Uid="DocsTooltip" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
<FontIcon FontSize="16" Glyph="&#xE8A5;" />
</Button> </Button>
<Button <Button
x:Name="ReportBugBtn" x:Name="ReportBugBtn"
x:Uid="BugReportBtn" x:Uid="BugReportBtn"
Click="ReportBugBtn_Click" Click="ReportBugBtn_Click"
Content="{ui:FontIcon Glyph=&#xebe8;,
FontSize=16}"
Style="{StaticResource FlyoutButtonStyle}"> Style="{StaticResource FlyoutButtonStyle}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="BugReportTooltip"/> <TextBlock x:Uid="BugReportTooltip" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
<FontIcon FontSize="16" Glyph="&#xebe8;" />
</Button> </Button>
<Button <Button
x:Name="SettingsBtn" x:Name="SettingsBtn"
Padding="8"
x:Uid="SettingsBtn" x:Uid="SettingsBtn"
Padding="8"
Click="SettingsBtn_Click" Click="SettingsBtn_Click"
Style="{StaticResource FlyoutButtonStyle}"> Style="{StaticResource FlyoutButtonStyle}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="SettingsTooltip"/> <TextBlock x:Uid="SettingsTooltip" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
<AnimatedIcon x:Name="SearchAnimatedIcon"> <AnimatedIcon x:Name="SearchAnimatedIcon">
<AnimatedIcon.Source> <AnimatedIcon.Source>

View File

@ -13,6 +13,7 @@ using Microsoft.PowerToys.Telemetry;
using Microsoft.UI.Xaml; using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation; using Microsoft.UI.Xaml.Media.Animation;
using WinUIEx;
namespace Microsoft.PowerToys.Settings.UI.Flyout namespace Microsoft.PowerToys.Settings.UI.Flyout
{ {
@ -141,6 +142,9 @@ namespace Microsoft.PowerToys.Settings.UI.Flyout
private void ReportBugBtn_Click(object sender, RoutedEventArgs e) private void ReportBugBtn_Click(object sender, RoutedEventArgs e)
{ {
ViewModel.StartBugReport(); ViewModel.StartBugReport();
// Closing manually the flyout since no window will steal the focus
App.GetFlyoutWindow()?.Hide();
} }
} }
} }

View File

@ -2,23 +2,23 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeAlwaysOnTop" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeAlwaysOnTop"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_AlwaysOnTop" x:Uid="Oobe_AlwaysOnTop"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/AlwaysOnTop.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/AlwaysOnTop.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_AlwaysOnTop_HowToUse" /> x:Uid="Oobe_AlwaysOnTop_HowToUse" />
@ -46,6 +46,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeAwake" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeAwake"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_Awake" x:Uid="Oobe_Awake"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/Awake.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/Awake.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
@ -46,6 +46,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,24 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeColorPicker" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeColorPicker"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_ColorPicker" x:Uid="Oobe_ColorPicker"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ColorPicker.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ColorPicker.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_ColorPicker_HowToUse" /> x:Uid="Oobe_ColorPicker_HowToUse" />
@ -51,6 +51,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,27 +2,27 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeCropAndLock" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeCropAndLock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_CropAndLock" x:Uid="Oobe_CropAndLock"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/CropAndLock.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/CropAndLock.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="ThumbnailHotkeyControl" x:Name="ThumbnailHotkeyControl"
x:Uid="Oobe_CropAndLock_HowToUse_Thumbnail" /> x:Uid="Oobe_CropAndLock_HowToUse_Thumbnail" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="ReparentHotkeyControl" x:Name="ReparentHotkeyControl"
x:Uid="Oobe_CropAndLock_HowToUse_Reparent" /> x:Uid="Oobe_CropAndLock_HowToUse_Reparent" />
@ -42,6 +42,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFancyZones" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFancyZones"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_FancyZones" x:Uid="Oobe_FancyZones"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FancyZones.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FancyZones.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
@ -21,7 +21,7 @@
<toolkitcontrols:MarkdownTextBlock <toolkitcontrols:MarkdownTextBlock
x:Uid="Oobe_FancyZones_HowToUse" x:Uid="Oobe_FancyZones_HowToUse"
Background="Transparent" /> Background="Transparent" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_FancyZones_HowToUse_Shortcut" /> x:Uid="Oobe_FancyZones_HowToUse_Shortcut" />
@ -49,6 +49,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,18 +2,18 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFileExplorer" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFileExplorer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_FileExplorer" x:Uid="Oobe_FileExplorer"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FileExplorer.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FileExplorer.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToEnable" x:Uid="Oobe_HowToEnable"
@ -39,6 +39,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFileLocksmith" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFileLocksmith"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_FileLocksmith" x:Uid="Oobe_FileLocksmith"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FileLocksmith.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FileLocksmith.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
@ -47,6 +47,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeHosts" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeHosts"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_Hosts" x:Uid="Oobe_Hosts"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/HostsFileEditor.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/HostsFileEditor.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<StackPanel <StackPanel
Margin="0,24,0,0" Margin="0,24,0,0"
@ -34,6 +34,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,18 +2,18 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeImageResizer" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeImageResizer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_ImageResizer" x:Uid="Oobe_ImageResizer"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ImageResizer.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ImageResizer.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToLaunch" x:Uid="Oobe_HowToLaunch"
@ -47,6 +47,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,16 +2,16 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeKBM" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeKBM"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_KBM" x:Uid="Oobe_KBM"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/KBM.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/KBM.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
@ -46,6 +46,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,24 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeMeasureTool" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeMeasureTool"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_MeasureTool" x:Uid="Oobe_MeasureTool"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ScreenRuler.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ScreenRuler.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToLaunch" x:Uid="Oobe_HowToLaunch"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyActivation" x:Name="HotkeyActivation"
x:Uid="Oobe_MeasureTool_Activation" /> x:Uid="Oobe_MeasureTool_Activation" />
@ -43,6 +43,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeMouseUtils" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeMouseUtils"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_MouseUtils" x:Uid="Oobe_MouseUtils"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/MouseUtils.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/MouseUtils.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_MouseUtils_FindMyMouse" x:Uid="Oobe_MouseUtils_FindMyMouse"
@ -59,6 +59,6 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeMouseWithoutBorders" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeMouseWithoutBorders"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_MouseWithoutBorders" x:Uid="Oobe_MouseWithoutBorders"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/MouseWithoutBorders.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/MouseWithoutBorders.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
@ -47,6 +47,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeOverview" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeOverview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_Overview" x:Uid="Oobe_Overview"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/OOBEPTHero.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/OOBEPTHero.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
@ -35,6 +35,6 @@
Click="SettingsLaunchButton_Click" /> Click="SettingsLaunchButton_Click" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,18 +2,18 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeOverviewAlternate" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeOverviewAlternate"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_Overview" x:Uid="Oobe_Overview"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/OOBEPTHeroShort.png" HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/OOBEPTHeroShort.png"
HeroImageHeight="120"> HeroImageHeight="120">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Alternate_OOBE_Description" x:Uid="Alternate_OOBE_Description"
@ -55,7 +55,7 @@
FontSize="12" FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="FancyZonesHotkeyControl" x:Name="FancyZonesHotkeyControl"
Grid.Row="3" Grid.Row="3"
Margin="0,8,0,0" /> Margin="0,8,0,0" />
@ -96,7 +96,7 @@
FontSize="12" FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="RunHotkeyControl" x:Name="RunHotkeyControl"
Grid.Row="3" Grid.Row="3"
Margin="0,8,0,0" /> Margin="0,8,0,0" />
@ -138,7 +138,7 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="To pick a color:" Text="To pick a color:"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="ColorPickerHotkeyControl" x:Name="ColorPickerHotkeyControl"
Grid.Row="3" Grid.Row="3"
Margin="0,8,0,0" /> Margin="0,8,0,0" />
@ -179,7 +179,7 @@
FontSize="12" FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="AlwaysOnTopHotkeyControl" x:Name="AlwaysOnTopHotkeyControl"
Grid.Row="3" Grid.Row="3"
Margin="0,8,0,0" /> Margin="0,8,0,0" />
@ -188,6 +188,6 @@
</GridView> </GridView>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,24 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePastePlain" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePastePlain"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_PastePlain" x:Uid="Oobe_PastePlain"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PastePlain.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PastePlain.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_PastePlain_HowToUse" /> x:Uid="Oobe_PastePlain_HowToUse" />
@ -39,6 +39,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -5,7 +5,7 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePeek" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePeek"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -13,17 +13,17 @@
mc:Ignorable="d" mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_Peek" x:Uid="Oobe_Peek"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/Peek.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/Peek.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_Peek_HowToUse" /> x:Uid="Oobe_Peek_HowToUse" />
@ -43,6 +43,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,18 +2,18 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePowerAccent" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePowerAccent"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_QuickAccent" x:Uid="Oobe_QuickAccent"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PowerAccent.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PowerAccent.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
@ -39,6 +39,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,24 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePowerOCR" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePowerOCR"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_TextExtractor" x:Uid="Oobe_TextExtractor"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PowerOCR.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PowerOCR.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToUse" x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_TextExtractor_HowToUse" /> x:Uid="Oobe_TextExtractor_HowToUse" />
@ -47,6 +47,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePowerRename" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobePowerRename"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_PowerRename" x:Uid="Oobe_PowerRename"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PowerRename.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/PowerRename.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
@ -47,6 +47,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,17 +2,17 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeRegistryPreview" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeRegistryPreview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_RegistryPreview" x:Uid="Oobe_RegistryPreview"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/RegistryPreview.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/RegistryPreview.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
@ -51,6 +51,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,24 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeRun" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeRun"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_Run" x:Uid="Oobe_Run"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/Run.gif"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/Run.gif">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToLaunch" x:Uid="Oobe_HowToLaunch"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_Run_HowToLaunch" /> x:Uid="Oobe_Run_HowToLaunch" />
@ -51,6 +51,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,10 +2,10 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeShellPage" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeShellPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations" xmlns:animations="using:CommunityToolkit.WinUI.Animations"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
HighContrastAdjustment="None" HighContrastAdjustment="None"
Loaded="ShellPage_Loaded" Loaded="ShellPage_Loaded"
mc:Ignorable="d"> mc:Ignorable="d">
@ -171,7 +171,7 @@
<NavigationView.FooterMenuItems> <NavigationView.FooterMenuItems>
<NavigationViewItem <NavigationViewItem
x:Uid="Shell_WhatsNew" x:Uid="Shell_WhatsNew"
Icon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Icon="{ui:FontIcon
Glyph=&#xF133;}" Glyph=&#xF133;}"
Tag="WhatsNew" /> Tag="WhatsNew" />
</NavigationView.FooterMenuItems> </NavigationView.FooterMenuItems>

View File

@ -2,23 +2,23 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeShortcutGuide" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeShortcutGuide"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_ShortcutGuide" x:Uid="Oobe_ShortcutGuide"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/OOBEShortcutGuide.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/OOBEShortcutGuide.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToLaunch" x:Uid="Oobe_HowToLaunch"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl" x:Name="HotkeyControl"
x:Uid="Oobe_ShortcutGuide_HowToLaunch" /> x:Uid="Oobe_ShortcutGuide_HowToLaunch" />
<StackPanel <StackPanel
@ -41,6 +41,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,33 +2,33 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeVideoConference" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeVideoConference"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:OOBEPageControl <custom:OOBEPageControl
x:Uid="Oobe_VideoConference" x:Uid="Oobe_VideoConference"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/VideoConferenceMute.png"> HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/VideoConferenceMute.png">
<controls:OOBEPageControl.PageContent> <custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock
x:Uid="Oobe_HowToLaunch" x:Uid="Oobe_HowToLaunch"
Style="{ThemeResource OobeSubtitleStyle}" /> Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyMicVidControl" x:Name="HotkeyMicVidControl"
x:Uid="Oobe_VideoConference_ToggleMicVid" /> x:Uid="Oobe_VideoConference_ToggleMicVid" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyMicControl" x:Name="HotkeyMicControl"
x:Uid="Oobe_VideoConference_ToggleMic" /> x:Uid="Oobe_VideoConference_ToggleMic" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyPushToTalkControl" x:Name="HotkeyPushToTalkControl"
x:Uid="Oobe_VideoConference_PushToTalkMic" /> x:Uid="Oobe_VideoConference_PushToTalkMic" />
<controls:ShortcutWithTextLabelControl <custom:ShortcutWithTextLabelControl
x:Name="HotkeyVidControl" x:Name="HotkeyVidControl"
x:Uid="Oobe_VideoConference_ToggleVid" /> x:Uid="Oobe_VideoConference_ToggleVid" />
@ -52,6 +52,6 @@
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</controls:OOBEPageControl.PageContent> </custom:OOBEPageControl.PageContent>
</controls:OOBEPageControl> </custom:OOBEPageControl>
</Page> </Page>

View File

@ -2,7 +2,7 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeWhatsNew" x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeWhatsNew"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

View File

@ -2,96 +2,74 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.AlwaysOnTopPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.AlwaysOnTopPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl
x:Uid="AlwaysOnTop" x:Uid="AlwaysOnTop"
IsTabStop="False" IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Settings/Modules/AlwaysOnTop.png"> ModuleImageSource="ms-appx:///Assets/Settings/Modules/AlwaysOnTop.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="AlwaysOnTop_EnableToggleControl_HeaderText" x:Uid="AlwaysOnTop_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsAlwaysOnTop.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsAlwaysOnTop.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="AlwaysOnTop_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="AlwaysOnTop_Activation_GroupSettings"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="AlwaysOnTop_ActivationShortcut" x:Uid="AlwaysOnTop_ActivationShortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
Glyph=&#xEDA7;}"
IsExpanded="True"> IsExpanded="True">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.Hotkey, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" <controls:SettingsExpander.Items>
HotkeySettings="{x:Bind Path=ViewModel.Hotkey, Mode=TwoWay}" /> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsExpander.Items> <CheckBox x:Uid="AlwaysOnTop_GameMode" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DoNotActivateOnGameMode}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox </controls:SettingsExpander.Items>
x:Uid="AlwaysOnTop_GameMode" </controls:SettingsExpander>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DoNotActivateOnGameMode}" /> </custom:SettingsGroup>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="AlwaysOnTop_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="AlwaysOnTop_Behavior_GroupSettings" <controls:SettingsExpander
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander
x:Uid="AlwaysOnTop_FrameEnabled" x:Uid="AlwaysOnTop_FrameEnabled"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
Glyph=&#xEB3C;}"
IsExpanded="True"> IsExpanded="True">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.FrameEnabled}" />
x:Uid="ToggleSwitch" <controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.FrameEnabled}" /> <controls:SettingsCard x:Uid="AlwaysOnTop_FrameColor_Mode" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}">
<labs:SettingsExpander.Items> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.FrameAccentColor, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<labs:SettingsCard
x:Uid="AlwaysOnTop_FrameColor_Mode"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.FrameAccentColor, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="AlwaysOnTop_Radio_Custom_Color" /> <ComboBoxItem x:Uid="AlwaysOnTop_Radio_Custom_Color" />
<ComboBoxItem x:Uid="AlwaysOnTop_Radio_Windows_Default" /> <ComboBoxItem x:Uid="AlwaysOnTop_Radio_Windows_Default" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="AlwaysOnTop_FrameColor" x:Uid="AlwaysOnTop_FrameColor"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.FrameAccentColor, Converter={StaticResource ReverseBoolToVisibilityConverter}}"> Visibility="{x:Bind Mode=OneWay, Path=ViewModel.FrameAccentColor, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.FrameColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.FrameColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="AlwaysOnTop_FrameOpacity" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}">
x:Uid="AlwaysOnTop_FrameOpacity"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.FrameOpacity}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.FrameOpacity}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="AlwaysOnTop_FrameThickness" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}">
x:Uid="AlwaysOnTop_FrameThickness"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.FrameEnabled}">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="5" LargeChange="5"
@ -99,44 +77,32 @@
Minimum="1" Minimum="1"
SmallChange="1" SmallChange="1"
Value="{x:Bind ViewModel.FrameThickness, Mode=TwoWay}" /> Value="{x:Bind ViewModel.FrameThickness, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard ContentAlignment="Left" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.Windows11, Converter={StaticResource BoolToVisibilityConverter}}">
ContentAlignment="Left" <CheckBox x:Uid="AlwaysOnTop_RoundCorners" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RoundCornersEnabled}" />
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.Windows11, Converter={StaticResource BoolToVisibilityConverter}}"> </controls:SettingsCard>
<CheckBox </controls:SettingsExpander.Items>
x:Uid="AlwaysOnTop_RoundCorners" </controls:SettingsExpander>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RoundCornersEnabled}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="AlwaysOnTop_SoundTitle" x:Uid="AlwaysOnTop_SoundTitle"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE7F3;}"
Glyph=&#xE7F3;}"
IsExpanded="True"> IsExpanded="True">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="AlwaysOnTop_Sound" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SoundEnabled}" />
x:Uid="AlwaysOnTop_Sound" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SoundEnabled}" /> </controls:SettingsExpander.Items>
</labs:SettingsCard> </controls:SettingsExpander>
</labs:SettingsExpander.Items> </custom:SettingsGroup>
</labs:SettingsExpander>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="ExcludedApps" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="ExcludedApps" <controls:SettingsExpander
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander
x:Uid="AlwaysOnTop_ExcludedApps" x:Uid="AlwaysOnTop_ExcludedApps"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"
Glyph=&#xECE4;}"
IsExpanded="True"> IsExpanded="True">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard <controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
HorizontalContentAlignment="Stretch"
ContentAlignment="Vertical">
<TextBox <TextBox
x:Uid="AlwaysOnTop_ExcludedApps_TextBoxControl" x:Uid="AlwaysOnTop_ExcludedApps_TextBoxControl"
MinWidth="240" MinWidth="240"
@ -147,17 +113,15 @@
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}" Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_AlwaysOnTop" Link="https://aka.ms/PowerToysOverview_AlwaysOnTop" />
x:Uid="LearnMore_AlwaysOnTop" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_AlwaysOnTop" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,12 +2,12 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.AwakePage" x:Class="Microsoft.PowerToys.Settings.UI.Views.AwakePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.PowerToys.Settings.UI.ViewModels" xmlns:viewmodels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
d:DataContext="{d:DesignInstance Type=viewmodels:AwakeViewModel}" d:DataContext="{d:DesignInstance Type=viewmodels:AwakeViewModel}"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
@ -17,20 +17,18 @@
<converters:AwakeModeToIntConverter x:Key="AwakeModeToIntConverter" /> <converters:AwakeModeToIntConverter x:Key="AwakeModeToIntConverter" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl <custom:SettingsPageControl
x:Uid="Awake" x:Uid="Awake"
IsTabStop="False" IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Settings/Modules/Awake.png"> ModuleImageSource="ms-appx:///Assets/Settings/Modules/Awake.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="Awake_EnableSettingsCard" x:Uid="Awake_EnableSettingsCard"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsAwake.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsAwake.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -38,45 +36,38 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Awake_BehaviorSettingsGroup" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="Awake_BehaviorSettingsGroup"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard <controls:SettingsCard x:Uid="Awake_ModeSettingsCard" HeaderIcon="{ui:FontIcon Glyph=&#xE945;}">
x:Uid="Awake_ModeSettingsCard" <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToIntConverter}}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE945;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToIntConverter}}">
<ComboBoxItem x:Uid="Awake_NoKeepAwakeSelector" /> <ComboBoxItem x:Uid="Awake_NoKeepAwakeSelector" />
<ComboBoxItem x:Uid="Awake_IndefiniteKeepAwakeSelector" /> <ComboBoxItem x:Uid="Awake_IndefiniteKeepAwakeSelector" />
<ComboBoxItem x:Uid="Awake_TemporaryKeepAwakeSelector" /> <ComboBoxItem x:Uid="Awake_TemporaryKeepAwakeSelector" />
<ComboBoxItem x:Uid="Awake_ExpirableKeepAwakeSelector" /> <ComboBoxItem x:Uid="Awake_ExpirableKeepAwakeSelector" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="Awake_ExpirationSettingsExpander" x:Uid="Awake_ExpirationSettingsExpander"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEC92;}" HeaderIcon="{ui:FontIcon Glyph=&#xEC92;}"
Visibility="{x:Bind ViewModel.IsExpirationConfigurationEnabled, Mode=OneWay}" IsExpanded="True"> IsExpanded="True"
<labs:SettingsExpander.Items> Visibility="{x:Bind ViewModel.IsExpirationConfigurationEnabled, Mode=OneWay}">
<labs:SettingsCard <controls:SettingsExpander.Items>
x:Uid="Awake_ExpirationSettingsExpander_Date"> <controls:SettingsCard x:Uid="Awake_ExpirationSettingsExpander_Date">
<DatePicker Date="{x:Bind ViewModel.ExpirationDateTime, Mode=TwoWay}"></DatePicker> <DatePicker Date="{x:Bind ViewModel.ExpirationDateTime, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="Awake_ExpirationSettingsExpander_Time">
x:Uid="Awake_ExpirationSettingsExpander_Time"> <TimePicker ClockIdentifier="24HourClock" Time="{x:Bind ViewModel.ExpirationTime, Mode=TwoWay}" />
<TimePicker Time="{x:Bind ViewModel.ExpirationTime, Mode=TwoWay}" ClockIdentifier="24HourClock"></TimePicker> </controls:SettingsCard>
</labs:SettingsCard> </controls:SettingsExpander.Items>
</labs:SettingsExpander.Items> </controls:SettingsExpander>
</labs:SettingsExpander>
<labs:SettingsCard <controls:SettingsCard
x:Uid="Awake_IntervalSettingsCard" x:Uid="Awake_IntervalSettingsCard"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE916;}" HeaderIcon="{ui:FontIcon Glyph=&#xE916;}"
Visibility="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"> Visibility="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}">
<StackPanel Orientation="Horizontal" MinWidth="{StaticResource SettingActionControlMinWidth}"> <StackPanel MinWidth="{StaticResource SettingActionControlMinWidth}" Orientation="Horizontal">
<NumberBox <NumberBox
x:Uid="Awake_IntervalHoursInput" x:Uid="Awake_IntervalHoursInput"
Width="96" Width="96"
@ -98,28 +89,23 @@
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind ViewModel.IntervalMinutes, Mode=TwoWay}" /> Value="{x:Bind ViewModel.IntervalMinutes, Mode=TwoWay}" />
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="Awake_DisplaySettingsCard" x:Uid="Awake_DisplaySettingsCard"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7F4;}" HeaderIcon="{ui:FontIcon Glyph=&#xE7F4;}"
IsEnabled="{x:Bind ViewModel.IsScreenConfigurationPossibleEnabled, Mode=OneWay}"> IsEnabled="{x:Bind ViewModel.IsScreenConfigurationPossibleEnabled, Mode=OneWay}">
<ToggleSwitch <ToggleSwitch IsOn="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}" />
IsOn="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}" /> </controls:SettingsCard>
</labs:SettingsCard> </custom:SettingsGroup>
</controls:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_Awake" Link="https://aka.ms/PowerToysOverview_Awake" />
x:Uid="LearnMore_Awake" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_Awake" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://awake.den.dev" Text="Den Delimarsky's work on creating Awake" />
<controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink </custom:SettingsPageControl>
Link="https://awake.den.dev"
Text="Den Delimarsky's work on creating Awake" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,13 +2,13 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.ColorPickerPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.ColorPickerPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="using:Microsoft.PowerToys.Settings.UI.Library" xmlns:models="using:Microsoft.PowerToys.Settings.UI.Library"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.PowerToys.Settings.UI.ViewModels" xmlns:viewmodels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
x:Name="RootPage" x:Name="RootPage"
d:DataContext="{d:DesignInstance Type=viewmodels:ColorPickerViewModel}" d:DataContext="{d:DesignInstance Type=viewmodels:ColorPickerViewModel}"
@ -19,19 +19,19 @@
<converters:BoolToVisibilityConverter x:Key="BoolToVis" /> <converters:BoolToVisibilityConverter x:Key="BoolToVis" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl x:Uid="ColorPicker" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ColorPicker.png"> <custom:SettingsPageControl x:Uid="ColorPicker" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ColorPicker.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel <StackPanel
x:Name="ColorPickerView" x:Name="ColorPickerView"
ChildrenTransitions="{StaticResource SettingsCardsAnimations}" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
Orientation="Vertical"> Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="ColorPicker_EnableColorPicker" x:Uid="ColorPicker_EnableColorPicker"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsColorPicker.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsColorPicker.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -39,23 +39,23 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> <controls:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" /> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ColorPicker_ActivationAction" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEC4E;}"> <controls:SettingsCard x:Uid="ColorPicker_ActivationAction" HeaderIcon="{ui:FontIcon Glyph=&#xEC4E;}">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.ActivationBehavior, Mode=TwoWay}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.ActivationBehavior, Mode=TwoWay}">
<ComboBoxItem x:Uid="EditorFirst" /> <ComboBoxItem x:Uid="EditorFirst" />
<ComboBoxItem x:Uid="ColorPickerFirst" /> <ComboBoxItem x:Uid="ColorPickerFirst" />
<ComboBoxItem x:Uid="ColorPickerOnly" /> <ComboBoxItem x:Uid="ColorPickerOnly" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="ColorFormats" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="ColorFormats" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="ColorPicker_CopiedColorRepresentation" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xF0E3;}"> <controls:SettingsCard x:Uid="ColorPicker_CopiedColorRepresentation" HeaderIcon="{ui:FontIcon Glyph=&#xF0E3;}">
<ComboBox <ComboBox
x:Name="ColorPicker_ComboBox" x:Name="ColorPicker_ComboBox"
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
@ -65,11 +65,11 @@
SelectedIndex="{Binding ColorFormatsPreviewIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding ColorFormatsPreviewIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValue="{Binding SelectedColorRepresentationValue, Mode=TwoWay}" SelectedValue="{Binding SelectedColorRepresentationValue, Mode=TwoWay}"
SelectedValuePath="Key" /> SelectedValuePath="Key" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ColorPicker_ShowColorName"> <controls:SettingsCard x:Uid="ColorPicker_ShowColorName">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding ShowColorName, Mode=TwoWay}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding ShowColorName, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<!-- <!--
Disabling this until we have a safer way to reset cursor as Disabling this until we have a safer way to reset cursor as
we can hit a state where the cursor doesn't reset we can hit a state where the cursor doesn't reset
@ -79,20 +79,19 @@
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsEnabled="{Binding IsEnabled}"/> IsEnabled="{Binding IsEnabled}"/>
--> -->
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="ColorPicker_Editor" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="ColorPicker_Editor" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard <controls:SettingsCard
x:Name="ColorFormatsSetting" x:Name="ColorFormatsSetting"
x:Uid="ColorPicker_ColorFormats" x:Uid="ColorPicker_ColorFormats"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE762;}">
Glyph=&#xE762;}">
<Button <Button
x:Uid="ColorPickerAddNewFormat" x:Uid="ColorPickerAddNewFormat"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Click="NewFormatClick" Click="NewFormatClick"
Style="{StaticResource AccentButtonStyle}" /> Style="{StaticResource AccentButtonStyle}" />
</labs:SettingsCard> </controls:SettingsCard>
<!-- Disabled reordering by dragging --> <!-- Disabled reordering by dragging -->
<!-- CanReorderItems="True" AllowDrop="True" --> <!-- CanReorderItems="True" AllowDrop="True" -->
<ItemsControl <ItemsControl
@ -102,17 +101,17 @@
ItemsSource="{Binding ColorFormats, Mode=TwoWay}"> ItemsSource="{Binding ColorFormats, Mode=TwoWay}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="models:ColorFormatModel"> <DataTemplate x:DataType="models:ColorFormatModel">
<labs:SettingsCard <controls:SettingsCard
Margin="0,0,0,2" Margin="0,0,0,2"
Click="EditButton_Click" Click="EditButton_Click"
Description="{x:Bind Example, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Description="{x:Bind Example, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Header="{x:Bind Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Header="{x:Bind Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsActionIconVisible="False" IsActionIconVisible="False"
IsClickEnabled="True"> IsClickEnabled="True">
<labs:SettingsCard.Resources> <controls:SettingsCard.Resources>
<x:Double x:Key="SettingsCardLeftIndention">42</x:Double> <x:Double x:Key="SettingsCardLeftIndention">42</x:Double>
<x:Double x:Key="SettingsCardActionButtonWidth">0</x:Double> <x:Double x:Key="SettingsCardActionButtonWidth">0</x:Double>
</labs:SettingsCard.Resources> </controls:SettingsCard.Resources>
<StackPanel Orientation="Horizontal" Spacing="4"> <StackPanel Orientation="Horizontal" Spacing="4">
<ToggleSwitch <ToggleSwitch
x:Uid="Enable_ColorFormat" x:Uid="Enable_ColorFormat"
@ -133,29 +132,19 @@
<MenuFlyoutItem <MenuFlyoutItem
x:Uid="MoveUp" x:Uid="MoveUp"
Click="ReorderButtonUp_Click" Click="ReorderButtonUp_Click"
IsEnabled="{x:Bind CanMoveUp, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> Icon="{ui:FontIcon Glyph=&#xE74A;}"
<MenuFlyoutItem.Icon> IsEnabled="{x:Bind CanMoveUp, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<FontIcon Glyph="&#xE74A;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem <MenuFlyoutItem
x:Uid="MoveDown" x:Uid="MoveDown"
Click="ReorderButtonDown_Click" Click="ReorderButtonDown_Click"
IsEnabled="{x:Bind CanMoveDown, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> Icon="{ui:FontIcon Glyph=&#xE74B;}"
<MenuFlyoutItem.Icon> IsEnabled="{x:Bind CanMoveDown, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<FontIcon Glyph="&#xE74B;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator /> <MenuFlyoutSeparator />
<MenuFlyoutItem <MenuFlyoutItem
x:Uid="RemoveItem" x:Uid="RemoveItem"
Click="RemoveButton_Click" Click="RemoveButton_Click"
IsEnabled="{x:Bind CanBeDeleted, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> Icon="{ui:FontIcon Glyph=&#xE74D;}"
<MenuFlyoutItem.Icon> IsEnabled="{x:Bind CanBeDeleted, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<FontIcon Glyph="&#xE74D;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout> </MenuFlyout>
</Button.Flyout> </Button.Flyout>
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
@ -163,11 +152,11 @@
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</controls:SettingsGroup> </custom:SettingsGroup>
<ContentDialog <ContentDialog
x:Name="ColorFormatDialog" x:Name="ColorFormatDialog"
x:Uid="ColorFormatDialog" x:Uid="ColorFormatDialog"
@ -178,7 +167,7 @@
<models:ColorFormatModel /> <models:ColorFormatModel />
</ContentDialog.DataContext> </ContentDialog.DataContext>
<ScrollViewer HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Auto">
<controls:ColorFormatEditor <custom:ColorFormatEditor
Width="480" Width="480"
Margin="2,0,0,0" Margin="2,0,0,0"
HorizontalAlignment="Left" HorizontalAlignment="Left"
@ -186,14 +175,14 @@
</ScrollViewer> </ScrollViewer>
</ContentDialog> </ContentDialog>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="LearnMore_ColorPicker" Link="https://aka.ms/PowerToysOverview_ColorPicker" /> <custom:PageLink x:Uid="LearnMore_ColorPicker" Link="https://aka.ms/PowerToysOverview_ColorPicker" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
<controls:SettingsPageControl.SecondaryLinks> <custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink Link="https://github.com/martinchrzan/ColorPicker/" Text="Martin Chrzan's Color Picker" /> <custom:PageLink Link="https://github.com/martinchrzan/ColorPicker/" Text="Martin Chrzan's Color Picker" />
<controls:PageLink Link="https://medium.com/@Niels9001/a-fluent-color-meter-for-powertoys-20407ededf0c" Text="Niels Laute's UX concept" /> <custom:PageLink Link="https://medium.com/@Niels9001/a-fluent-color-meter-for-powertoys-20407ededf0c" Text="Niels Laute's UX concept" />
</controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -5,7 +5,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Input; using System.Windows.Input;
using CommunityToolkit.Labs.WinUI; using CommunityToolkit.WinUI.Controls;
using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.ViewModels; using Microsoft.PowerToys.Settings.UI.ViewModels;

View File

@ -2,72 +2,56 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.CropAndLockPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.CropAndLockPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl
x:Uid="CropAndLock" x:Uid="CropAndLock"
IsTabStop="False" IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Settings/Modules/CropAndLock.png"> ModuleImageSource="ms-appx:///Assets/Settings/Modules/CropAndLock.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="CropAndLock_EnableToggleControl_HeaderText" x:Uid="CropAndLock_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsCropAndLock.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsCropAndLock.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="CropAndLock_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="CropAndLock_Activation_GroupSettings"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard <controls:SettingsCard x:Uid="CropAndLock_ThumbnailActivation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
x:Uid="CropAndLock_ThumbnailActivation_Shortcut" <custom:ShortcutControl
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEDA7;}">
<controls:ShortcutControl
AllowDisable="True"
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.ThumbnailActivationShortcut, Mode=TwoWay}" /> HotkeySettings="{x:Bind Path=ViewModel.ThumbnailActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="CropAndLock_ReparentActivation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
x:Uid="CropAndLock_ReparentActivation_Shortcut" <custom:ShortcutControl
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEDA7;}">
<controls:ShortcutControl
AllowDisable="True"
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.ReparentActivationShortcut, Mode=TwoWay}" /> HotkeySettings="{x:Bind Path=ViewModel.ReparentActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_CropAndLock" Link="https://aka.ms/PowerToysOverview_CropAndLock" />
x:Uid="LearnMore_CropAndLock" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_CropAndLock" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://github.com/robmikh" Text="Robert Mikhayelyan" />
<controls:SettingsPageControl.SecondaryLinks> <custom:PageLink Link="https://github.com/kevinguo305" Text="Kevin Guo" />
<controls:PageLink </custom:SettingsPageControl.SecondaryLinks>
Link="https://github.com/robmikh" </custom:SettingsPageControl>
Text="Robert Mikhayelyan" />
<controls:PageLink
Link="https://github.com/kevinguo305"
Text="Kevin Guo" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,27 +2,23 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.FancyZonesPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.FancyZonesPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="FancyZones" ModuleImageSource="ms-appx:///Assets/Settings/Modules/FancyZones.png">
x:Uid="FancyZones" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/FancyZones.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <controls:SettingsCard
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="FancyZones_EnableToggleControl_HeaderText" x:Uid="FancyZones_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFancyZones.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFancyZones.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -30,98 +26,71 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="FancyZones_Editor_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="FancyZones_Editor_GroupSettings" <controls:SettingsCard
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard
x:Uid="FancyZones_LaunchEditorButtonControl" x:Uid="FancyZones_LaunchEditorButtonControl"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon FontSize=14,
FontSize=14, Glyph=&#xE8A7;}"
Glyph=&#xE8A7;}"
Command="{x:Bind ViewModel.LaunchEditorEventHandler}" Command="{x:Bind ViewModel.LaunchEditorEventHandler}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEB3C;}" HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
IsClickEnabled="True" /> IsClickEnabled="True" />
<labs:SettingsCard <controls:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
x:Uid="Activation_Shortcut" <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}" />
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> </controls:SettingsCard>
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="FancyZones_UseCursorPosEditorStartupScreen" HeaderIcon="{ui:FontIcon Glyph=&#xe7b5;}">
x:Uid="FancyZones_UseCursorPosEditorStartupScreen" <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.UseCursorPosEditorStartupScreen, Converter={StaticResource BoolToComboBoxIndexConverter}}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xe7b5;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.UseCursorPosEditorStartupScreen, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="FancyZones_LaunchPositionScreen" /> <ComboBoxItem x:Uid="FancyZones_LaunchPositionScreen" />
<ComboBoxItem x:Uid="FancyZones_LaunchPositionMouse" /> <ComboBoxItem x:Uid="FancyZones_LaunchPositionMouse" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup
x:Name="ZonesSettingsGroup" x:Name="ZonesSettingsGroup"
x:Uid="FancyZones_Zones" x:Uid="FancyZones_Zones"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander <controls:SettingsExpander x:Uid="FancyZones_ZoneBehavior_GroupSettings" IsExpanded="True">
x:Uid="FancyZones_ZoneBehavior_GroupSettings" <controls:SettingsExpander.Items>
IsExpanded="True"> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsExpander.Items> <CheckBox x:Uid="FancyZones_ShiftDragCheckBoxControl_Header" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShiftDrag}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox <controls:SettingsCard ContentAlignment="Left">
x:Uid="FancyZones_ShiftDragCheckBoxControl_Header" <CheckBox x:Uid="FancyZones_MouseDragCheckBoxControl_Header" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MouseSwitch}" />
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShiftDrag}" /> </controls:SettingsCard>
</labs:SettingsCard> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsCard ContentAlignment="Left"> <CheckBox x:Uid="FancyZones_MouseMiddleClickSpanningMultipleZonesCheckBoxControl_Header" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MouseMiddleClickSpanningMultipleZones}" />
<CheckBox </controls:SettingsCard>
x:Uid="FancyZones_MouseDragCheckBoxControl_Header" <controls:SettingsCard ContentAlignment="Left">
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MouseSwitch}" /> <CheckBox x:Uid="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowOnAllMonitors}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <custom:CheckBoxWithDescriptionControl x:Uid="FancyZones_SpanZonesAcrossMonitors" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SpanZonesAcrossMonitors}" />
x:Uid="FancyZones_MouseMiddleClickSpanningMultipleZonesCheckBoxControl_Header" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MouseMiddleClickSpanningMultipleZones}" /> <controls:SettingsCard x:Uid="FancyZones_OverlappingZones">
</labs:SettingsCard> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.OverlappingZonesAlgorithmIndex, Mode=TwoWay}">
<labs:SettingsCard ContentAlignment="Left">
<CheckBox
x:Uid="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowOnAllMonitors}" />
</labs:SettingsCard>
<labs:SettingsCard ContentAlignment="Left">
<controls:CheckBoxWithDescriptionControl
x:Uid="FancyZones_SpanZonesAcrossMonitors"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SpanZonesAcrossMonitors}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="FancyZones_OverlappingZones">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Path=ViewModel.OverlappingZonesAlgorithmIndex, Mode=TwoWay}">
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesSmallest" /> <ComboBoxItem x:Uid="FancyZones_OverlappingZonesSmallest" />
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesLargest" /> <ComboBoxItem x:Uid="FancyZones_OverlappingZonesLargest" />
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesPositional" /> <ComboBoxItem x:Uid="FancyZones_OverlappingZonesPositional" />
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesClosestCenter" /> <ComboBoxItem x:Uid="FancyZones_OverlappingZonesClosestCenter" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FancyZones_Zone_Appearance" x:Uid="FancyZones_Zone_Appearance"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEB3C;}" HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
IsExpanded="True"> IsExpanded="True">
<ComboBox <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.SystemTheme, Converter={StaticResource BoolToComboBoxIndexConverter}}">
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.SystemTheme, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="FancyZones_Radio_Custom_Colors" /> <ComboBoxItem x:Uid="FancyZones_Radio_Custom_Colors" />
<ComboBoxItem x:Uid="FancyZones_Radio_Default_Theme" /> <ComboBoxItem x:Uid="FancyZones_Radio_Default_Theme" />
</ComboBox> </ComboBox>
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<controls:FancyZonesPreviewControl <custom:FancyZonesPreviewControl
Width="192" Width="192"
Height="108" Height="108"
CustomBorderColor="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=OneWay}" CustomBorderColor="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=OneWay}"
@ -131,213 +100,141 @@
HighlightOpacity="{x:Bind Mode=OneWay, Path=ViewModel.HighlightOpacity}" HighlightOpacity="{x:Bind Mode=OneWay, Path=ViewModel.HighlightOpacity}"
IsSystemTheme="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme}" IsSystemTheme="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme}"
ShowZoneNumber="{x:Bind Path=ViewModel.ShowZoneNumber, Mode=OneWay}" /> ShowZoneNumber="{x:Bind Path=ViewModel.ShowZoneNumber, Mode=OneWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="FancyZones_ShowZoneNumberCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowZoneNumber}" />
x:Uid="FancyZones_ShowZoneNumberCheckBoxControl" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowZoneNumber}" /> <controls:SettingsCard x:Uid="FancyZones_HighlightOpacity">
</labs:SettingsCard>
<labs:SettingsCard x:Uid="FancyZones_HighlightOpacity">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.HighlightOpacity}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.HighlightOpacity}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="FancyZones_ZoneHighlightColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
x:Uid="FancyZones_ZoneHighlightColor" <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneHighlightColor, Mode=TwoWay}" />
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}"> </controls:SettingsCard>
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneHighlightColor, Mode=TwoWay}" /> <controls:SettingsCard x:Uid="FancyZones_InActiveColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
</labs:SettingsCard> <custom:ColorPickerButton x:Name="InActiveColorButton" SelectedColor="{x:Bind Path=ViewModel.ZoneInActiveColor, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
x:Uid="FancyZones_InActiveColor" <controls:SettingsCard x:Uid="FancyZones_BorderColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}"> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=TwoWay}" />
<controls:ColorPickerButton </controls:SettingsCard>
x:Name="InActiveColorButton" <controls:SettingsCard x:Uid="FancyZones_NumberColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
SelectedColor="{x:Bind Path=ViewModel.ZoneInActiveColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneNumberColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard </controls:SettingsExpander.Items>
x:Uid="FancyZones_BorderColor" </controls:SettingsExpander>
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}"> </custom:SettingsGroup>
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard
x:Uid="FancyZones_NumberColor"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneNumberColor, Mode=TwoWay}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="FancyZones_Windows" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="FancyZones_Windows"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander <controls:SettingsExpander x:Uid="FancyZones_WindowBehavior_GroupSettings" IsExpanded="True">
x:Uid="FancyZones_WindowBehavior_GroupSettings" <controls:SettingsExpander.Items>
IsExpanded="True"> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsExpander.Items> <CheckBox x:Uid="FancyZones_DisplayChangeMoveWindowsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisplayChangeMoveWindows}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox <controls:SettingsCard ContentAlignment="Left">
x:Uid="FancyZones_DisplayChangeMoveWindowsCheckBoxControl" <CheckBox x:Uid="FancyZones_ZoneSetChangeMoveWindows" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ZoneSetChangeMoveWindows}" />
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisplayChangeMoveWindows}" /> </controls:SettingsCard>
</labs:SettingsCard> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsCard ContentAlignment="Left"> <CheckBox x:Uid="FancyZones_AppLastZoneMoveWindows" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AppLastZoneMoveWindows}" />
<CheckBox </controls:SettingsCard>
x:Uid="FancyZones_ZoneSetChangeMoveWindows" <controls:SettingsCard ContentAlignment="Left">
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ZoneSetChangeMoveWindows}" /> <CheckBox x:Uid="FancyZones_OpenWindowOnActiveMonitor" IsChecked="{Binding Mode=TwoWay, Path=OpenWindowOnActiveMonitor}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="FancyZones_RestoreSize" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreSize}" />
x:Uid="FancyZones_AppLastZoneMoveWindows" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AppLastZoneMoveWindows}" /> <controls:SettingsCard ContentAlignment="Left">
</labs:SettingsCard> <CheckBox x:Uid="FancyZones_MakeDraggedWindowTransparentCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MakeDraggedWindowsTransparent}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox <controls:SettingsCard ContentAlignment="Left">
x:Uid="FancyZones_OpenWindowOnActiveMonitor" <custom:CheckBoxWithDescriptionControl
IsChecked="{Binding Mode=TwoWay, Path=OpenWindowOnActiveMonitor}" />
</labs:SettingsCard>
<labs:SettingsCard ContentAlignment="Left">
<CheckBox
x:Uid="FancyZones_RestoreSize"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreSize}" />
</labs:SettingsCard>
<labs:SettingsCard ContentAlignment="Left">
<CheckBox
x:Uid="FancyZones_MakeDraggedWindowTransparentCheckBoxControl"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MakeDraggedWindowsTransparent}" />
</labs:SettingsCard>
<labs:SettingsCard ContentAlignment="Left">
<controls:CheckBoxWithDescriptionControl
x:Uid="FancyZones_AllowPopupWindowSnap" x:Uid="FancyZones_AllowPopupWindowSnap"
Margin="0,0,0,6" Margin="0,0,0,6"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AllowPopupWindowSnap}" /> IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AllowPopupWindowSnap}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="FancyZones_AllowChildWindowSnap" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AllowChildWindowSnap}" />
x:Uid="FancyZones_AllowChildWindowSnap" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AllowChildWindowSnap}" /> <controls:SettingsCard ContentAlignment="Left" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.Windows11, Converter={StaticResource BoolToVisibilityConverter}}">
</labs:SettingsCard> <CheckBox x:Uid="FancyZones_DisableRoundCornersOnWindowSnap" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisableRoundCornersOnWindowSnap}" />
<labs:SettingsCard </controls:SettingsCard>
ContentAlignment="Left" </controls:SettingsExpander.Items>
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.Windows11, Converter={StaticResource BoolToVisibilityConverter}}"> </controls:SettingsExpander>
<CheckBox
x:Uid="FancyZones_DisableRoundCornersOnWindowSnap"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisableRoundCornersOnWindowSnap}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FancyZones_WindowSwitching_GroupSettings" x:Uid="FancyZones_WindowSwitching_GroupSettings"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
IsExpanded="True"> IsExpanded="True">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.WindowSwitching}" />
x:Uid="ToggleSwitch" <controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.WindowSwitching}" /> <controls:SettingsCard x:Uid="FancyZones_HotkeyNextTabControl" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}">
<labs:SettingsExpander.Items> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.NextTabHotkey, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
x:Uid="FancyZones_HotkeyNextTabControl" <controls:SettingsCard x:Uid="FancyZones_HotkeyPrevTabControl" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}"> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.PrevTabHotkey, Mode=TwoWay}" />
<controls:ShortcutControl </controls:SettingsCard>
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsExpander.Items>
HotkeySettings="{x:Bind Path=ViewModel.NextTabHotkey, Mode=TwoWay}" /> </controls:SettingsExpander>
</labs:SettingsCard>
<labs:SettingsCard
x:Uid="FancyZones_HotkeyPrevTabControl"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.PrevTabHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FancyZones_OverrideSnapHotkeys" x:Uid="FancyZones_OverrideSnapHotkeys"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE90C;}" HeaderIcon="{ui:FontIcon Glyph=&#xE90C;}"
IsExpanded="True"> IsExpanded="True">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.OverrideSnapHotkeys}" />
x:Uid="ToggleSwitch" <controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.OverrideSnapHotkeys}" /> <controls:SettingsCard x:Uid="FancyZones_MoveWindow" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}">
<labs:SettingsExpander.Items>
<labs:SettingsCard
x:Uid="FancyZones_MoveWindow"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}">
<ComboBox <ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
MinHeight="56" MinHeight="56"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnPosition, Converter={StaticResource BoolToComboBoxIndexConverter}}"> SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnPosition, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Accessible"> <ComboBoxItem x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Accessible">
<StackPanel <StackPanel Orientation="Vertical" Spacing="4">
Orientation="Vertical" <custom:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex" />
Spacing="4"> <TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
<controls:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex" />
<TextBlock
FontFamily="{ThemeResource SymbolThemeFontFamily}"
Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Description" /> <Run x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Description" />
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
</ComboBoxItem> </ComboBoxItem>
<ComboBoxItem x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Accessible"> <ComboBoxItem x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Accessible">
<StackPanel <StackPanel Orientation="Vertical" Spacing="4">
Orientation="Vertical" <custom:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowBasedOnRelativePosition" />
Spacing="4"> <TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
<controls:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowBasedOnRelativePosition" />
<TextBlock
FontFamily="{ThemeResource SymbolThemeFontFamily}"
Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Description" /> <Run x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Description" />
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
</ComboBoxItem> </ComboBoxItem>
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}">
ContentAlignment="Left" <CheckBox x:Uid="FancyZones_MoveWindowsAcrossAllMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsAcrossMonitors}" />
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}"> </controls:SettingsCard>
<CheckBox </controls:SettingsExpander.Items>
x:Uid="FancyZones_MoveWindowsAcrossAllMonitorsCheckBoxControl" </controls:SettingsExpander>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsAcrossMonitors}" /> </custom:SettingsGroup>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="FancyZones_Layouts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="FancyZones_Layouts" <controls:SettingsExpander x:Uid="FancyZones_QuickLayoutSwitch" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.QuickLayoutSwitch}" />
<labs:SettingsExpander <controls:SettingsExpander.Items>
x:Uid="FancyZones_QuickLayoutSwitch" <controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.QuickSwitchEnabled}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> <CheckBox x:Uid="FancyZones_FlashZonesOnQuickSwitch" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.FlashZonesOnQuickSwitch}" />
<ToggleSwitch </controls:SettingsCard>
x:Uid="ToggleSwitch" </controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.QuickLayoutSwitch}" /> </controls:SettingsExpander>
<labs:SettingsExpander.Items> </custom:SettingsGroup>
<labs:SettingsCard
ContentAlignment="Left"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.QuickSwitchEnabled}">
<CheckBox
x:Uid="FancyZones_FlashZonesOnQuickSwitch"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.FlashZonesOnQuickSwitch}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="ExcludedApps" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="ExcludedApps"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FancyZones_ExcludeApps" x:Uid="FancyZones_ExcludeApps"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xECE4;}" HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"
IsExpanded="True"> IsExpanded="True">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Vertical" HorizontalContentAlignment="Stretch"> <controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
<TextBox <TextBox
x:Uid="FancyZones_ExcludeApps_TextBoxControl" x:Uid="FancyZones_ExcludeApps_TextBoxControl"
MinWidth="240" MinWidth="240"
@ -348,17 +245,15 @@
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}" Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_FancyZones" Link="https://aka.ms/PowerToysOverview_FancyZones" />
x:Uid="LearnMore_FancyZones" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_FancyZones" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,26 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.FileLocksmithPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.FileLocksmithPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="FileLocksmith" ModuleImageSource="ms-appx:///Assets/Settings/Modules/FileLocksmith.png">
x:Uid="FileLocksmith" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/FileLocksmith.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <controls:SettingsCard
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="FileLocksmith_Enable_FileLocksmith" x:Uid="FileLocksmith_Enable_FileLocksmith"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFileLocksmith.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFileLocksmith.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch IsOn="{x:Bind ViewModel.IsFileLocksmithEnabled, Mode=TwoWay}" /> <ToggleSwitch IsOn="{x:Bind ViewModel.IsFileLocksmithEnabled, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -30,31 +28,24 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="FileLocksmith_ShellIntegration" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsFileLocksmithEnabled}">
x:Uid="FileLocksmith_ShellIntegration" <controls:SettingsCard x:Uid="FileLocksmith_Toggle_ContextMenu">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsFileLocksmithEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextExtendedMenu, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<labs:SettingsCard
x:Uid="FileLocksmith_Toggle_ContextMenu">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextExtendedMenu, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="FileLocksmith_Toggle_StandardContextMenu" /> <ComboBoxItem x:Uid="FileLocksmith_Toggle_StandardContextMenu" />
<ComboBoxItem x:Uid="FileLocksmith_Toggle_ExtendedContextMenu" /> <ComboBoxItem x:Uid="FileLocksmith_Toggle_ExtendedContextMenu" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="ExtendedContextMenuInfo" x:Uid="ExtendedContextMenuInfo"
IsClosable="False" IsClosable="False"
IsOpen="True" IsOpen="True"
IsTabStop="True" IsTabStop="True"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_FileLocksmith" Link="https://aka.ms/PowerToysOverview_FileLocksmith" />
x:Uid="LearnMore_FileLocksmith" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_FileLocksmith" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,12 +2,12 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.GeneralPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.GeneralPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
@ -16,12 +16,12 @@
<localConverters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" /> <localConverters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png"> <custom:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0"> <custom:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0">
<labs:SettingsCard Header="{Binding PowerToysVersion}" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE895;}"> <controls:SettingsCard Header="{Binding PowerToysVersion}" HeaderIcon="{ui:FontIcon Glyph=&#xE895;}">
<labs:SettingsCard.Description> <controls:SettingsCard.Description>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock Style="{StaticResource SecondaryTextStyle}"> <TextBlock Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="General_VersionLastChecked" /> <Run x:Uid="General_VersionLastChecked" />
@ -33,7 +33,7 @@
FontWeight="SemiBold" FontWeight="SemiBold"
NavigateUri="https://github.com/microsoft/PowerToys/releases/" /> NavigateUri="https://github.com/microsoft/PowerToys/releases/" />
</StackPanel> </StackPanel>
</labs:SettingsCard.Description> </controls:SettingsCard.Description>
<Grid Visibility="{Binding IsUpdatePanelVisible, Mode=OneWay}"> <Grid Visibility="{Binding IsUpdatePanelVisible, Mode=OneWay}">
<StackPanel <StackPanel
VerticalAlignment="Center" VerticalAlignment="Center"
@ -55,7 +55,7 @@
IsEnabled="{Binding IsDownloadAllowed}" IsEnabled="{Binding IsDownloadAllowed}"
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" /> Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
</Grid> </Grid>
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="General_UpToDate" x:Uid="General_UpToDate"
IsClosable="False" IsClosable="False"
@ -175,68 +175,67 @@
</InfoBar.ActionButton> </InfoBar.ActionButton>
</InfoBar> </InfoBar>
<labs:SettingsCard <controls:SettingsCard
x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates" x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
Margin="0,-6,0,0" Margin="0,-6,0,0"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAutoDownloadUpdatesCardEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAutoDownloadUpdatesCardEnabled}"
Visibility="{Binding Mode=OneWay, Path=IsAdmin, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{Binding Mode=OneWay, Path=IsAdmin, Converter={StaticResource BoolToVisibilityConverter}}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_AutoDownloadUpdatesIsDisabled" x:Uid="GPO_AutoDownloadUpdatesIsDisabled"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.ShowAutoDownloadUpdatesGpoInformation}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.ShowAutoDownloadUpdatesGpoInformation}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ShowAutoDownloadUpdatesGpoInformation}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ShowAutoDownloadUpdatesGpoInformation}"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Admin_Mode"> <custom:SettingsGroup x:Uid="Admin_Mode">
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="Admin_Mode_Running_As" x:Uid="Admin_Mode_Running_As"
Header="{Binding Mode=OneWay, Path=RunningAsText}" Header="{Binding Mode=OneWay, Path=RunningAsText}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE7EF;}"
Glyph=&#xE7EF;}"
IsExpanded="True"> IsExpanded="True">
<labs:SettingsExpander.Description> <controls:SettingsExpander.Description>
<HyperlinkButton x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" /> <HyperlinkButton x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" />
</labs:SettingsExpander.Description> </controls:SettingsExpander.Description>
<Button <Button
x:Uid="GeneralPage_RestartAsAdmin_Button" x:Uid="GeneralPage_RestartAsAdmin_Button"
Command="{Binding RestartElevatedButtonEventHandler}" Command="{Binding RestartElevatedButtonEventHandler}"
IsEnabled="{Binding Mode=OneWay, Path=IsAdminButtonEnabled}" /> IsEnabled="{Binding Mode=OneWay, Path=IsAdminButtonEnabled}" />
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=OneWay, Path=IsElevated}"> <controls:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=OneWay, Path=IsElevated}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=RunElevated}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=RunElevated}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True"> <custom:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">
<labs:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE790;}"> <controls:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=&#xE790;}">
<labs:SettingsCard.Description> <controls:SettingsCard.Description>
<HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" /> <HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
</labs:SettingsCard.Description> </controls:SettingsCard.Description>
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}">
<ComboBoxItem x:Uid="Radio_Theme_Dark" /> <ComboBoxItem x:Uid="Radio_Theme_Dark" />
<ComboBoxItem x:Uid="Radio_Theme_Light" /> <ComboBoxItem x:Uid="Radio_Theme_Light" />
<ComboBoxItem x:Uid="Radio_Theme_Default" /> <ComboBoxItem x:Uid="Radio_Theme_Default" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="GeneralPage_RunAtStartUp"> <controls:SettingsCard x:Uid="GeneralPage_RunAtStartUp">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=Startup}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=Startup}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="General_SettingsBackupAndRestoreTitle" Visibility="Visible"> <custom:SettingsGroup x:Uid="General_SettingsBackupAndRestoreTitle" Visibility="Visible">
<labs:SettingsExpander x:Uid="General_SettingsBackupAndRestore" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE777;}"> <controls:SettingsExpander x:Uid="General_SettingsBackupAndRestore" HeaderIcon="{ui:FontIcon Glyph=&#xE777;}">
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Uid="General_SettingsBackupAndRestore_ButtonBackup" Command="{Binding BackupConfigsEventHandler}" /> <Button x:Uid="General_SettingsBackupAndRestore_ButtonBackup" Command="{Binding BackupConfigsEventHandler}" />
<Button x:Uid="General_SettingsBackupAndRestore_ButtonRestore" Command="{Binding RestoreConfigsEventHandler}" /> <Button x:Uid="General_SettingsBackupAndRestore_ButtonRestore" Command="{Binding RestoreConfigsEventHandler}" />
</StackPanel> </StackPanel>
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText"> <controls:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
<StackPanel <StackPanel
HorizontalAlignment="Right" HorizontalAlignment="Right"
Orientation="Horizontal" Orientation="Horizontal"
@ -244,10 +243,10 @@
<TextBlock <TextBlock
x:Name="pathTextBlock" x:Name="pathTextBlock"
VerticalAlignment="Center" VerticalAlignment="Center"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True" IsTextSelectionEnabled="True"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}" Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis">
Foreground="{ThemeResource TextFillColorSecondaryBrush}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<ToolTip IsEnabled="{Binding ElementName=pathTextBlock, Path=IsTextTrimmed}"> <ToolTip IsEnabled="{Binding ElementName=pathTextBlock, Path=IsTextTrimmed}">
<TextBlock Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}" /> <TextBlock Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}" />
@ -265,14 +264,14 @@
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="General_SettingsBackupAndRestoreStatusInfo" x:Uid="General_SettingsBackupAndRestoreStatusInfo"
HorizontalContentAlignment="Left" HorizontalContentAlignment="Left"
ContentAlignment="Vertical"> ContentAlignment="Vertical">
<Grid Margin="0,0,0,6" ColumnSpacing="8"> <Grid Margin="0,0,0,6" ColumnSpacing="8">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="{StaticResource SettingActionControlMinWidth}"/> <ColumnDefinition Width="Auto" MinWidth="{StaticResource SettingActionControlMinWidth}" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -309,10 +308,10 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}" Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding LastSettingsBackupDate, Mode=OneWay}" /> Text="{Binding LastSettingsBackupDate, Mode=OneWay}" />
</Grid> </Grid>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
<InfoBar <InfoBar
x:Uid="General_SettingsBackupMessageResults" x:Uid="General_SettingsBackupMessageResults"
Title="{Binding SettingsBackupMessage}" Title="{Binding SettingsBackupMessage}"
@ -320,32 +319,32 @@
IsOpen="{Binding SettingsBackupRestoreMessageVisible, Mode=OneWay}" IsOpen="{Binding SettingsBackupRestoreMessageVisible, Mode=OneWay}"
IsTabStop="{Binding SettingsBackupRestoreMessageVisible, Mode=OneWay}" IsTabStop="{Binding SettingsBackupRestoreMessageVisible, Mode=OneWay}"
Severity="{Binding BackupRestoreMessageSeverity, Converter={StaticResource StringToInfoBarSeverityConverter}}" /> Severity="{Binding BackupRestoreMessageSeverity, Converter={StaticResource StringToInfoBarSeverityConverter}}" />
<controls:SettingsGroup x:Uid="General_Experimentation" Visibility="Visible"> <custom:SettingsGroup x:Uid="General_Experimentation" Visibility="Visible">
<labs:SettingsCard x:Uid="GeneralPage_EnableExperimentation" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed, Converter={StaticResource BoolNegationConverter}}"> <controls:SettingsCard x:Uid="GeneralPage_EnableExperimentation" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed, Converter={StaticResource BoolNegationConverter}}">
<labs:SettingsCard.HeaderIcon> <controls:SettingsCard.HeaderIcon>
<PathIcon Data="M1859 1758q14 23 21 47t7 51q0 40-15 75t-41 61-61 41-75 15H354q-40 0-75-15t-61-41-41-61-15-75q0-27 6-51t21-47l569-992q10-14 10-34V128H640V0h768v128h-128v604q0 19 10 35l569 991zM896 732q0 53-27 99l-331 577h972l-331-577q-27-46-27-99V128H896v604zm799 1188q26 0 44-19t19-45q0-10-2-17t-8-16l-164-287H464l-165 287q-9 15-9 33 0 26 18 45t46 19h1341z" /> <PathIcon Data="M1859 1758q14 23 21 47t7 51q0 40-15 75t-41 61-61 41-75 15H354q-40 0-75-15t-61-41-41-61-15-75q0-27 6-51t21-47l569-992q10-14 10-34V128H640V0h768v128h-128v604q0 19 10 35l569 991zM896 732q0 53-27 99l-331 577h972l-331-577q-27-46-27-99V128H896v604zm799 1188q26 0 44-19t19-45q0-10-2-17t-8-16l-164-287H464l-165 287q-9 15-9 33 0 26 18 45t46 19h1341z" />
</labs:SettingsCard.HeaderIcon> </controls:SettingsCard.HeaderIcon>
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=EnableExperimentation}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=EnableExperimentation}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_ExperimentationIsDisallowed" x:Uid="GPO_ExperimentationIsDisallowed"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed}"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview" /> <custom:PageLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview" />
<controls:PageLink x:Uid="General_Repository" Link="https://aka.ms/powertoys" /> <custom:PageLink x:Uid="General_Repository" Link="https://aka.ms/powertoys" />
<controls:PageLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug" /> <custom:PageLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug" />
<controls:PageLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature" /> <custom:PageLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
<controls:SettingsPageControl.SecondaryLinks> <custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink x:Uid="GeneralPage_PrivacyStatement_URL" Link="http://go.microsoft.com/fwlink/?LinkId=521839" /> <custom:PageLink x:Uid="GeneralPage_PrivacyStatement_URL" Link="http://go.microsoft.com/fwlink/?LinkId=521839" />
<controls:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md" /> <custom:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md" />
</controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -2,76 +2,69 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.HostsPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.HostsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl x:Uid="Hosts" ModuleImageSource="ms-appx:///Assets/Settings/Modules/HostsFileEditor.png"> <custom:SettingsPageControl x:Uid="Hosts" ModuleImageSource="ms-appx:///Assets/Settings/Modules/HostsFileEditor.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="Hosts_EnableToggleControl_HeaderText" x:Uid="Hosts_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsHosts.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsHosts.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup x:Uid="Hosts_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="Hosts_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard <controls:SettingsCard
x:Uid="Hosts_LaunchButtonControl" x:Uid="Hosts_LaunchButtonControl"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon FontSize=14,
FontSize=14,
Glyph=&#xE8A7;}" Glyph=&#xE8A7;}"
Command="{x:Bind ViewModel.LaunchEventHandler}" Command="{x:Bind ViewModel.LaunchEventHandler}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xEA37;}"
Glyph=&#xEA37;}"
IsClickEnabled="True" /> IsClickEnabled="True" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="Hosts_Toggle_LaunchAdministrator" x:Uid="Hosts_Toggle_LaunchAdministrator"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE7EF;}"
Glyph=&#xE7EF;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.LaunchAdministratorEnabled}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.LaunchAdministratorEnabled}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.LaunchAdministrator}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.LaunchAdministrator}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="Hosts_Toggle_ShowStartupWarning" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7BA;}"> <controls:SettingsCard x:Uid="Hosts_Toggle_ShowStartupWarning" HeaderIcon="{ui:FontIcon Glyph=&#xE7BA;}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.ShowStartupWarning}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.ShowStartupWarning}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Hosts_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="Hosts_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="Hosts_AdditionalLinesPosition" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE8A5;}"> <controls:SettingsCard x:Uid="Hosts_AdditionalLinesPosition" HeaderIcon="{ui:FontIcon Glyph=&#xE8A5;}">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.AdditionalLinesPosition, Mode=TwoWay}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.AdditionalLinesPosition, Mode=TwoWay}">
<ComboBoxItem x:Uid="Hosts_AdditionalLinesPosition_Top" /> <ComboBoxItem x:Uid="Hosts_AdditionalLinesPosition_Top" />
<ComboBoxItem x:Uid="Hosts_AdditionalLinesPosition_Bottom" /> <ComboBoxItem x:Uid="Hosts_AdditionalLinesPosition_Bottom" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="Hosts_Toggle_LoopbackDuplicates" HeaderIcon="{ui:FontIcon Glyph=&#xEC27;}">
x:Uid="Hosts_Toggle_LoopbackDuplicates" <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.LoopbackDuplicates}" />
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEC27;}"> </controls:SettingsCard>
<ToggleSwitch <controls:SettingsCard x:Uid="Hosts_Encoding">
x:Uid="ToggleSwitch" <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.Encoding, Mode=TwoWay}">
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.LoopbackDuplicates}" /> <ComboBoxItem x:Uid="Hosts_Encoding_Utf8" />
</labs:SettingsCard> <ComboBoxItem x:Uid="Hosts_Encoding_Utf8Bom" />
<labs:SettingsCard x:Uid="Hosts_Encoding"> </ComboBox>
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.Encoding, Mode=TwoWay}"> </controls:SettingsCard>
<ComboBoxItem x:Uid="Hosts_Encoding_Utf8" /> </custom:SettingsGroup>
<ComboBoxItem x:Uid="Hosts_Encoding_Utf8Bom" />
</ComboBox>
</labs:SettingsCard>
</controls:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="LearnMore_Hosts" Link="https://aka.ms/PowerToysOverview_HostsFileEditor" /> <custom:PageLink x:Uid="LearnMore_Hosts" Link="https://aka.ms/PowerToysOverview_HostsFileEditor" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -2,14 +2,14 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.ImageResizerPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.ImageResizerPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="using:Microsoft.PowerToys.Settings.UI.Library" xmlns:models="using:Microsoft.PowerToys.Settings.UI.Library"
xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
x:Name="RootPage" x:Name="RootPage"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
@ -21,15 +21,15 @@
FalseValue="1" FalseValue="1"
TrueValue="0" /> TrueValue="0" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl x:Uid="ImageResizer" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ImageResizer.png"> <custom:SettingsPageControl x:Uid="ImageResizer" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ImageResizer.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard <controls:SettingsCard
x:Uid="ImageResizer_EnableToggle" x:Uid="ImageResizer_EnableToggle"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsImageResizer.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsImageResizer.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" /> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -38,13 +38,13 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup x:Uid="ImageResizer_CustomSizes" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="ImageResizer_CustomSizes" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="ImageResizer_Presets" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE792;}"> <controls:SettingsCard x:Uid="ImageResizer_Presets" HeaderIcon="{ui:FontIcon Glyph=&#xE792;}">
<Button <Button
x:Uid="ImageResizer_AddSizeButton" x:Uid="ImageResizer_AddSizeButton"
Click="AddSizeButton_Click" Click="AddSizeButton_Click"
Style="{ThemeResource AccentButtonStyle}" /> Style="{ThemeResource AccentButtonStyle}" />
</labs:SettingsCard> </controls:SettingsCard>
<ListView <ListView
x:Name="ImagesSizesListView" x:Name="ImagesSizesListView"
x:Uid="ImagesSizesListView" x:Uid="ImagesSizesListView"
@ -53,11 +53,11 @@
SelectionMode="None"> SelectionMode="None">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate x:Name="SingleLineDataTemplate" x:DataType="models:ImageSize"> <DataTemplate x:Name="SingleLineDataTemplate" x:DataType="models:ImageSize">
<labs:SettingsCard Header="{x:Bind Name, Mode=OneWay}"> <controls:SettingsCard Header="{x:Bind Name, Mode=OneWay}">
<labs:SettingsCard.Resources> <controls:SettingsCard.Resources>
<x:Double x:Key="SettingsCardLeftIndention">42</x:Double> <x:Double x:Key="SettingsCardLeftIndention">42</x:Double>
</labs:SettingsCard.Resources> </controls:SettingsCard.Resources>
<labs:SettingsCard.Description> <controls:SettingsCard.Description>
<StackPanel <StackPanel
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@ -93,7 +93,7 @@
Style="{ThemeResource SecondaryTextStyle}" Style="{ThemeResource SecondaryTextStyle}"
Text="{x:Bind Unit, Mode=OneWay, Converter={StaticResource ImageResizerUnitToStringConverter}, ConverterParameter=ToLower}" /> Text="{x:Bind Unit, Mode=OneWay, Converter={StaticResource ImageResizerUnitToStringConverter}, ConverterParameter=ToLower}" />
</StackPanel> </StackPanel>
</labs:SettingsCard.Description> </controls:SettingsCard.Description>
<StackPanel <StackPanel
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -175,14 +175,14 @@
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>
</ListView> </ListView>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Encoding" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="Encoding" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="ImageResizer_FallBackEncoderText"> <controls:SettingsCard x:Uid="ImageResizer_FallBackEncoderText">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.Encoder, Mode=TwoWay}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.Encoder, Mode=TwoWay}">
<ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_PNG" /> <ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_PNG" />
<ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_BMP" /> <ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_BMP" />
@ -191,25 +191,25 @@
<ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_WMPhoto" /> <ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_WMPhoto" />
<ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_GIF" /> <ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_GIF" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ImageResizer_Encoding"> <controls:SettingsCard x:Uid="ImageResizer_Encoding">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.JPEGQualityLevel}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.JPEGQualityLevel}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ImageResizer_PNGInterlacing"> <controls:SettingsCard x:Uid="ImageResizer_PNGInterlacing">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.PngInterlaceOption}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.PngInterlaceOption}">
<ComboBoxItem x:Uid="Default" /> <ComboBoxItem x:Uid="Default" />
<ComboBoxItem x:Uid="On" /> <ComboBoxItem x:Uid="On" />
<ComboBoxItem x:Uid="Off" /> <ComboBoxItem x:Uid="Off" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ImageResizer_TIFFCompression"> <controls:SettingsCard x:Uid="ImageResizer_TIFFCompression">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.TiffCompressOption}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.TiffCompressOption}">
<ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_Default" /> <ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_Default" />
<ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_None" /> <ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_None" />
@ -219,11 +219,11 @@
<ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_RLE" /> <ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_RLE" />
<ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_Zip" /> <ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_Zip" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="File" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="File" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="ImageResizer_FilenameFormatHeader"> <controls:SettingsCard x:Uid="ImageResizer_FilenameFormatHeader">
<StackPanel Orientation="Horizontal" Spacing="4"> <StackPanel Orientation="Horizontal" Spacing="4">
<TextBox <TextBox
x:Uid="ImageResizer_FilenameFormatPlaceholder" x:Uid="ImageResizer_FilenameFormatPlaceholder"
@ -268,24 +268,24 @@
</Button.Flyout> </Button.Flyout>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ImageResizer_FileModifiedDate"> <controls:SettingsCard x:Uid="ImageResizer_FileModifiedDate">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.KeepDateModified, Converter={StaticResource ReverseBoolToComboBoxIndexConverter}}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.KeepDateModified, Converter={StaticResource ReverseBoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="ImageResizer_UseOriginalDate" /> <ComboBoxItem x:Uid="ImageResizer_UseOriginalDate" />
<ComboBoxItem x:Uid="ImageResizer_UseResizeDate" /> <ComboBoxItem x:Uid="ImageResizer_UseResizeDate" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="LearnMore_ImageResizer" Link="https://aka.ms/PowerToysOverview_ImageResizer" /> <custom:PageLink x:Uid="LearnMore_ImageResizer" Link="https://aka.ms/PowerToysOverview_ImageResizer" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
<controls:SettingsPageControl.SecondaryLinks> <custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink Link="https://github.com/bricelam/ImageResizer/" Text="Brice Lambson's ImageResizer" /> <custom:PageLink Link="https://github.com/bricelam/ImageResizer/" Text="Brice Lambson's ImageResizer" />
</controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -3,38 +3,27 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Lib="using:Microsoft.PowerToys.Settings.UI.Library" xmlns:Lib="using:Microsoft.PowerToys.Settings.UI.Library"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
<converters:VisibleIfNotEmptyConverter x:Key="visibleIfNotEmptyConverter" /> <converters:CollectionVisibilityConverter x:Key="CollectionVisibilityConverter" />
<Style x:Name="KeysListViewContainerStyle" TargetType="ListViewItem">
<Style
x:Name="KeysListViewContainerStyle"
TargetType="ListViewItem">
<Setter Property="IsTabStop" Value="False" /> <Setter Property="IsTabStop" Value="False" />
</Style> </Style>
<DataTemplate <DataTemplate x:Key="OriginalKeyTemplate" x:DataType="x:String">
x:Key="OriginalKeyTemplate" <custom:KeyVisual Content="{Binding}" VisualType="SmallOutline" />
x:DataType="x:String">
<controls:KeyVisual
Content="{Binding}"
VisualType="SmallOutline" />
</DataTemplate> </DataTemplate>
<DataTemplate <DataTemplate x:Key="RemappedKeyTemplate" x:DataType="x:String">
x:Key="RemappedKeyTemplate" <custom:KeyVisual Content="{Binding}" VisualType="Small" />
x:DataType="x:String">
<controls:KeyVisual
Content="{Binding}"
VisualType="Small" />
</DataTemplate> </DataTemplate>
<!--<DataTemplate x:Name="KeysListViewTemplate" x:DataType="Lib:KeysDataModel"> <!--<DataTemplate x:Name="KeysListViewTemplate" x:DataType="Lib:KeysDataModel">
@ -56,26 +45,20 @@
</DataTemplate>--> </DataTemplate>-->
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="KeyboardManager" ModuleImageSource="ms-appx:///Assets/Settings/Modules/KBM.png">
x:Uid="KeyboardManager" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/KBM.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <controls:SettingsCard
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="KeyboardManager_EnableToggle" x:Uid="KeyboardManager_EnableToggle"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsKeyboardManager.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsKeyboardManager.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.Enabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" <controls:SettingsCard.Description>
IsOn="{x:Bind ViewModel.Enabled, Mode=TwoWay}" />
<labs:SettingsCard.Description>
<HyperlinkButton NavigateUri="https://aka.ms/powerToysCannotRemapKeys"> <HyperlinkButton NavigateUri="https://aka.ms/powerToysCannotRemapKeys">
<TextBlock <TextBlock x:Uid="KBM_KeysCannotBeRemapped" FontWeight="SemiBold" />
x:Uid="KBM_KeysCannotBeRemapped"
FontWeight="SemiBold" />
</HyperlinkButton> </HyperlinkButton>
</labs:SettingsCard.Description> </controls:SettingsCard.Description>
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -83,17 +66,13 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="KeyboardManager_Keys" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
x:Uid="KeyboardManager_Keys" <controls:SettingsCard
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<labs:SettingsCard
x:Uid="KeyboardManager_RemapKeyboardButton" x:Uid="KeyboardManager_RemapKeyboardButton"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon FontSize=14,
FontSize=14,
Glyph=&#xE8A7;}" Glyph=&#xE8A7;}"
Command="{Binding Path=RemapKeyboardCommand}" Command="{Binding Path=RemapKeyboardCommand}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE92E;}"
Glyph=&#xE92E;}"
IsClickEnabled="True" /> IsClickEnabled="True" />
<ListView <ListView
@ -102,10 +81,10 @@
IsSwipeEnabled="False" IsSwipeEnabled="False"
ItemsSource="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay}" ItemsSource="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay}"
SelectionMode="None" SelectionMode="None"
Visibility="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}"> Visibility="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay, Converter={StaticResource CollectionVisibilityConverter}}">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate x:DataType="Lib:KeysDataModel"> <DataTemplate x:DataType="Lib:KeysDataModel">
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ItemsControl <ItemsControl
IsTabStop="False" IsTabStop="False"
@ -113,13 +92,11 @@
ItemsSource="{x:Bind GetMappedOriginalKeys()}"> ItemsSource="{x:Bind GetMappedOriginalKeys()}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel <StackPanel Orientation="Horizontal" Spacing="4" />
Orientation="Horizontal"
Spacing="4" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
<controls:IsEnabledTextBlock <custom:IsEnabledTextBlock
x:Uid="To" x:Uid="To"
Margin="8,0,8,0" Margin="8,0,8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -132,30 +109,24 @@
ItemsSource="{x:Bind GetMappedNewRemapKeys()}"> ItemsSource="{x:Bind GetMappedNewRemapKeys()}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel <StackPanel Orientation="Horizontal" Spacing="4" />
Orientation="Horizontal"
Spacing="4" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>
</ListView> </ListView>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="KeyboardManager_Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
x:Uid="KeyboardManager_Shortcuts" <controls:SettingsCard
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<labs:SettingsCard
x:Uid="KeyboardManager_RemapShortcutsButton" x:Uid="KeyboardManager_RemapShortcutsButton"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon FontSize=14,
FontSize=14,
Glyph=&#xE8A7;}" Glyph=&#xE8A7;}"
Command="{Binding Path=EditShortcutCommand}" Command="{Binding Path=EditShortcutCommand}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE92E;}"
Glyph=&#xE92E;}"
IsClickEnabled="True" /> IsClickEnabled="True" />
<ListView <ListView
@ -164,10 +135,10 @@
IsSwipeEnabled="False" IsSwipeEnabled="False"
ItemsSource="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay}" ItemsSource="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay}"
SelectionMode="None" SelectionMode="None"
Visibility="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}"> Visibility="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay, Converter={StaticResource CollectionVisibilityConverter}}">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate x:DataType="Lib:AppSpecificKeysDataModel"> <DataTemplate x:DataType="Lib:AppSpecificKeysDataModel">
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ItemsControl <ItemsControl
IsTabStop="False" IsTabStop="False"
@ -175,13 +146,11 @@
ItemsSource="{x:Bind GetMappedOriginalKeys()}"> ItemsSource="{x:Bind GetMappedOriginalKeys()}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel <StackPanel Orientation="Horizontal" Spacing="4" />
Orientation="Horizontal"
Spacing="4" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
<controls:IsEnabledTextBlock <custom:IsEnabledTextBlock
x:Uid="To" x:Uid="To"
Margin="8,0,8,0" Margin="8,0,8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -195,9 +164,7 @@
ItemsSource="{x:Bind GetMappedNewRemapKeys()}"> ItemsSource="{x:Bind GetMappedNewRemapKeys()}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel <StackPanel Orientation="Horizontal" Spacing="4" />
Orientation="Horizontal"
Spacing="4" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
@ -207,24 +174,20 @@
VerticalAlignment="Center" VerticalAlignment="Center"
CornerRadius="12"> CornerRadius="12">
<Border.Background> <Border.Background>
<SolidColorBrush <SolidColorBrush Opacity="0.3" Color="{ThemeResource SystemAccentColor}" />
Opacity="0.3"
Color="{ThemeResource SystemAccentColor}" />
</Border.Background> </Border.Background>
<TextBlock Text="{x:Bind TargetApp}" /> <TextBlock Text="{x:Bind TargetApp}" />
</Border> </Border>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>
</ListView> </ListView>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_KBM" Link="https://aka.ms/PowerToysOverview_KeyboardManager" />
x:Uid="LearnMore_KBM" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_KeyboardManager" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,65 +2,49 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.MeasureToolPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.MeasureToolPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="MeasureTool" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ScreenRuler.png">
x:Uid="MeasureTool" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/ScreenRuler.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <controls:SettingsCard
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="MeasureTool_EnableMeasureTool" x:Uid="MeasureTool_EnableMeasureTool"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsScreenRuler.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsScreenRuler.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="MeasureTool_ActivationSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="MeasureTool_ActivationSettings" <controls:SettingsCard x:Uid="MeasureTool_ActivationShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
x:Uid="MeasureTool_ActivationShortcut" <controls:SettingsCard x:Uid="MeasureTool_DefaultMeasureStyle">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MeasureTool_DefaultMeasureStyle">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.DefaultMeasureStyle, Mode=TwoWay}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.DefaultMeasureStyle, Mode=TwoWay}">
<ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_None"/> <ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_None" />
<ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Bounds" /> <ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Bounds" />
<ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Spacing" /> <ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Spacing" />
<ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Horizontal_Spacing" /> <ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Horizontal_Spacing" />
<ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Vertical_Spacing" /> <ComboBoxItem x:Uid="MeasureTool_DefaultMeasureStyle_Vertical_Spacing" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="MeasureTool_Settings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="MeasureTool_Settings" <controls:SettingsCard x:Uid="MeasureTool_ContinuousCapture" HeaderIcon="{ui:FontIcon Glyph=&#xE7FB;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ToggleSwitch x:Uid="MeasureTool_ContinuousCapture_ToggleSwitch" IsOn="{x:Bind ViewModel.ContinuousCapture, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
x:Uid="MeasureTool_ContinuousCapture"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7FB;}">
<ToggleSwitch
x:Uid="MeasureTool_ContinuousCapture_ToggleSwitch"
IsOn="{x:Bind ViewModel.ContinuousCapture, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="MeasureTool_ContinuousCapture_Information" x:Uid="MeasureTool_ContinuousCapture_Information"
IsClosable="False" IsClosable="False"
@ -68,51 +52,41 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ShowContinuousCaptureWarning}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ShowContinuousCaptureWarning}"
Severity="Warning" /> Severity="Warning" />
<labs:SettingsCard <controls:SettingsCard x:Uid="MeasureTool_PerColorChannelEdgeDetection" HeaderIcon="{ui:FontIcon Glyph=&#xE7FB;}">
x:Uid="MeasureTool_PerColorChannelEdgeDetection" <ToggleSwitch x:Uid="MeasureTool_PerColorChannelEdgeDetection_ToggleSwitch" IsOn="{x:Bind ViewModel.PerColorChannelEdgeDetection, Mode=TwoWay}" />
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7FB;}"> </controls:SettingsCard>
<ToggleSwitch
x:Uid="MeasureTool_PerColorChannelEdgeDetection_ToggleSwitch"
IsOn="{x:Bind ViewModel.PerColorChannelEdgeDetection, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MeasureTool_PixelTolerance"> <controls:SettingsCard x:Uid="MeasureTool_PixelTolerance">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="255" Maximum="255"
Minimum="0" Minimum="0"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.PixelTolerance}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.PixelTolerance}" />
</labs:SettingsCard> </controls:SettingsCard>
<!--<labs:SettingsCard x:Uid="MeasureTool_UnitsOfMeasure" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xECC6;}"> <!--<controls:SettingsCard x:Uid="MeasureTool_UnitsOfMeasure" HeaderIcon="{ui:FontIcon Glyph=&#xECC6;}">
<ComboBox SelectedIndex="{x:Bind Path=ViewModel.UnitsOfMeasure, Mode=TwoWay}" MinWidth="{StaticResource SettingActionControlMinWidth}"> <ComboBox SelectedIndex="{x:Bind Path=ViewModel.UnitsOfMeasure, Mode=TwoWay}" MinWidth="{StaticResource SettingActionControlMinWidth}">
<ComboBoxItem x:Uid="MeasureTool_UnitsOfMeasure_Pixels" /> <ComboBoxItem x:Uid="MeasureTool_UnitsOfMeasure_Pixels" />
<ComboBoxItem x:Uid="MeasureTool_UnitsOfMeasure_Inches" /> <ComboBoxItem x:Uid="MeasureTool_UnitsOfMeasure_Inches" />
<ComboBoxItem x:Uid="MeasureTool_UnitsOfMeasure_Centimeters" /> <ComboBoxItem x:Uid="MeasureTool_UnitsOfMeasure_Centimeters" />
</ComboBox> </ComboBox>
</labs:SettingsCard>--> </controls:SettingsCard>-->
<labs:SettingsCard x:Uid="MeasureTool_DrawFeetOnCross"> <controls:SettingsCard x:Uid="MeasureTool_DrawFeetOnCross">
<ToggleSwitch <ToggleSwitch x:Uid="MeasureTool_DrawFeetOnCross_ToggleSwitch" IsOn="{x:Bind ViewModel.DrawFeetOnCross, Mode=TwoWay}" />
x:Uid="MeasureTool_DrawFeetOnCross_ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.DrawFeetOnCross, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MeasureTool_MeasureCrossColor"> <controls:SettingsCard x:Uid="MeasureTool_MeasureCrossColor">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.CrossColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.CrossColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_MeasureTool" Link="https://aka.ms/PowerToysOverview_ScreenRuler" />
x:Uid="LearnMore_MeasureTool" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_ScreenRuler" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink x:Uid="Attribution_Rooler" Link="https://github.com/peteblois/rooler" />
<controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink </custom:SettingsPageControl>
x:Uid="Attribution_Rooler"
Link="https://github.com/peteblois/rooler" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,57 +2,51 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.MouseUtilsPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.MouseUtilsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
<localConverters:FindMyMouseActivationIntToVisibilityConverter x:Key="FindMyMouseActivationIntToVisibilityConverter" /> <localConverters:FindMyMouseActivationIntToVisibilityConverter x:Key="FindMyMouseActivationIntToVisibilityConverter" />
<converters:NegativeBoolToVisibilityConverter <converters:BoolToVisibilityConverter
x:Key="BoolToInvertedVisibilityConverter" /> x:Key="BoolToInvertedVisibilityConverter"
FalseValue="Visible"
TrueValue="Collapsed" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="MouseUtils" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseUtils.png">
x:Uid="MouseUtils" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseUtils.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsGroup x:Uid="MouseUtils_FindMyMouse">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <controls:SettingsCard
<controls:SettingsGroup x:Uid="MouseUtils_FindMyMouse">
<labs:SettingsCard
x:Uid="MouseUtils_Enable_FindMyMouse" x:Uid="MouseUtils_Enable_FindMyMouse"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFindMyMouse.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFindMyMouse.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsFindMyMouseEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsFindMyMouseEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsFindMyMouseEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsFindMyMouseEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsFindMyMouseEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsFindMyMouseEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="MouseUtils_FindMyMouse_ActivationMethod" x:Uid="MouseUtils_FindMyMouse_ActivationMethod"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE961;}" HeaderIcon="{ui:FontIcon Glyph=&#xE961;}"
IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}" IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}"
IsExpanded="True"> IsExpanded="True">
<ComboBox <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.FindMyMouseActivationMethod, Mode=TwoWay}">
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Path=ViewModel.FindMyMouseActivationMethod, Mode=TwoWay}">
<ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationDoubleControlPress" /> <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationDoubleControlPress" />
<ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationDoubleRightControlPress" /> <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationDoubleRightControlPress" />
<ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationShakeMouse" /> <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationShakeMouse" />
<ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationCustomizedShortcut" /> <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationCustomizedShortcut" />
</ComboBox> </ComboBox>
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingMinimumDistance" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, ConverterParameter=2}">
x:Uid="MouseUtils_FindMyMouse_ShakingMinimumDistance"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, ConverterParameter=2}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="1000" LargeChange="1000"
@ -61,42 +55,40 @@
SmallChange="100" SmallChange="100"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseShakingMinimumDistance}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseShakingMinimumDistance}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="MouseUtils_FindMyMouse_ActivationShortcut" x:Uid="MouseUtils_FindMyMouse_ActivationShortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEDA7;}"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, ConverterParameter=3}"> Visibility="{x:Bind Mode=OneWay, Path=ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, ConverterParameter=3}">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.FindMyMouseActivationShortcut, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.FindMyMouseActivationShortcut, Mode=TwoWay}" /> <controls:SettingsCard ContentAlignment="Left">
</labs:SettingsCard> <CheckBox x:Uid="MouseUtils_Prevent_Activation_On_Game_Mode" IsChecked="{x:Bind ViewModel.FindMyMouseDoNotActivateOnGameMode, Mode=TwoWay}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox </controls:SettingsExpander.Items>
x:Uid="MouseUtils_Prevent_Activation_On_Game_Mode" </controls:SettingsExpander>
IsChecked="{x:Bind ViewModel.FindMyMouseDoNotActivateOnGameMode, Mode=TwoWay}" />
</labs:SettingsCard> <controls:SettingsExpander
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander
x:Uid="Appearance_Behavior" x:Uid="Appearance_Behavior"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEB3C;}" HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}" IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}"
IsExpanded="False"> IsExpanded="False">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="MouseUtils_FindMyMouse_OverlayOpacity"> <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_OverlayOpacity">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="1" Minimum="1"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseOverlayOpacity}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseOverlayOpacity}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_FindMyMouse_BackgroundColor"> <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_BackgroundColor">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.FindMyMouseBackgroundColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.FindMyMouseBackgroundColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_FindMyMouse_SpotlightColor"> <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_SpotlightColor">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.FindMyMouseSpotlightColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.FindMyMouseSpotlightColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_FindMyMouse_SpotlightRadius"> <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_SpotlightRadius">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="10" LargeChange="10"
@ -104,38 +96,38 @@
SmallChange="1" SmallChange="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseSpotlightRadius}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseSpotlightRadius}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_FindMyMouse_SpotlightInitialZoom"> <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_SpotlightInitialZoom">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="40" Maximum="40"
Minimum="1" Minimum="1"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseSpotlightInitialZoom}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseSpotlightInitialZoom}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_FindMyMouse_AnimationDurationMs"> <controls:SettingsCard x:Uid="MouseUtils_FindMyMouse_AnimationDurationMs">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAnimationEnabledBySystem}"
LargeChange="100" LargeChange="100"
Minimum="0" Minimum="0"
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAnimationEnabledBySystem}"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseAnimationDurationMs}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseAnimationDurationMs}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
<InfoBar <InfoBar
x:Uid="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled" x:Uid="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled"
IsClosable="False" IsClosable="False"
IsOpen="True" IsOpen="True"
Severity="Informational" Severity="Informational"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.IsAnimationEnabledBySystem, Converter={StaticResource BoolToInvertedVisibilityConverter}}" /> Visibility="{x:Bind Mode=OneWay, Path=ViewModel.IsAnimationEnabledBySystem, Converter={StaticResource BoolToInvertedVisibilityConverter}}" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="MouseUtils_FindMyMouse_ExcludedApps" x:Uid="MouseUtils_FindMyMouse_ExcludedApps"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xECE4;}" HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"
IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}"> IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Vertical" HorizontalContentAlignment="Stretch"> <controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
<TextBox <TextBox
x:Uid="MouseUtils_FindMyMouse_ExcludedApps_TextBoxControl" x:Uid="MouseUtils_FindMyMouse_ExcludedApps_TextBoxControl"
MinWidth="240" MinWidth="240"
@ -147,57 +139,51 @@
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseExcludedApps, UpdateSourceTrigger=PropertyChanged}" Text="{x:Bind Mode=TwoWay, Path=ViewModel.FindMyMouseExcludedApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseUtils_MouseHighlighter"> <custom:SettingsGroup x:Uid="MouseUtils_MouseHighlighter">
<labs:SettingsCard <controls:SettingsCard
x:Uid="MouseUtils_Enable_MouseHighlighter" x:Uid="MouseUtils_Enable_MouseHighlighter"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseHighlighter.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseHighlighter.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsHighlighterEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsHighlighterEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsHighlighterEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsHighlighterEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsHighlighterEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsHighlighterEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="MouseUtils_MouseHighlighter_ActivationShortcut" x:Uid="MouseUtils_MouseHighlighter_ActivationShortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
IsEnabled="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=OneWay}" IsEnabled="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=OneWay}"
IsExpanded="True"> IsExpanded="True">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MouseHighlighterActivationShortcut, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" <controls:SettingsExpander.Items>
HotkeySettings="{x:Bind Path=ViewModel.MouseHighlighterActivationShortcut, Mode=TwoWay}" /> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsExpander.Items> <CheckBox x:Uid="MouseUtils_AutoActivate" IsChecked="{x:Bind ViewModel.MouseHighlighterAutoActivate, Mode=TwoWay}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox </controls:SettingsExpander.Items>
x:Uid="MouseUtils_AutoActivate" </controls:SettingsExpander>
IsChecked="{x:Bind ViewModel.MouseHighlighterAutoActivate, Mode=TwoWay}" /> <controls:SettingsExpander
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander
x:Uid="Appearance_Behavior" x:Uid="Appearance_Behavior"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEB3C;}" HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
IsEnabled="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=OneWay}"> IsEnabled="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=OneWay}">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="MouseUtils_MouseHighlighter_PrimaryButtonClickColor"> <controls:SettingsCard x:Uid="MouseUtils_MouseHighlighter_PrimaryButtonClickColor">
<controls:AlphaColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterLeftButtonClickColor, Mode=TwoWay}" /> <custom:AlphaColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterLeftButtonClickColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MouseHighlighter_SecondaryButtonClickColor"> <controls:SettingsCard x:Uid="MouseUtils_MouseHighlighter_SecondaryButtonClickColor">
<controls:AlphaColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterRightButtonClickColor, Mode=TwoWay}" /> <custom:AlphaColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterRightButtonClickColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MouseHighlighter_AlwaysColor"> <controls:SettingsCard x:Uid="MouseUtils_MouseHighlighter_AlwaysColor">
<controls:AlphaColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterAlwaysColor, Mode=TwoWay}" /> <custom:AlphaColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterAlwaysColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MouseHighlighter_HighlightRadius"> <controls:SettingsCard x:Uid="MouseUtils_MouseHighlighter_HighlightRadius">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="10" LargeChange="10"
@ -205,8 +191,8 @@
SmallChange="1" SmallChange="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MouseHighlighterRadius}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MouseHighlighterRadius}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MouseHighlighter_FadeDelayMs"> <controls:SettingsCard x:Uid="MouseUtils_MouseHighlighter_FadeDelayMs">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="100" LargeChange="100"
@ -214,8 +200,8 @@
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MouseHighlighterFadeDelayMs}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MouseHighlighterFadeDelayMs}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MouseHighlighter_FadeDurationMs"> <controls:SettingsCard x:Uid="MouseUtils_MouseHighlighter_FadeDurationMs">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="100" LargeChange="100"
@ -223,39 +209,35 @@
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MouseHighlighterFadeDurationMs}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MouseHighlighterFadeDurationMs}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseUtils_MouseJump"> <custom:SettingsGroup x:Uid="MouseUtils_MouseJump">
<labs:SettingsCard <controls:SettingsCard
x:Uid="MouseUtils_Enable_MouseJump" x:Uid="MouseUtils_Enable_MouseJump"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseJump.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseJump.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsJumpEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsJumpEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsMouseJumpEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsMouseJumpEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsJumpEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsJumpEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsJumpEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsJumpEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="MouseUtils_MouseJump_ActivationShortcut" x:Uid="MouseUtils_MouseJump_ActivationShortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
IsEnabled="{x:Bind ViewModel.IsMouseJumpEnabled, Mode=OneWay}"> IsEnabled="{x:Bind ViewModel.IsMouseJumpEnabled, Mode=OneWay}">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MouseJumpActivationShortcut, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.MouseJumpActivationShortcut, Mode=TwoWay}" /> <controls:SettingsCard
</labs:SettingsCard> x:Uid="MouseUtils_MouseJump_ThumbnailSize"
<labs:SettingsCard HeaderIcon="{ui:FontIcon Glyph=&#xE740;}"
x:Uid="MouseUtils_MouseJump_ThumbnailSize" IsEnabled="{x:Bind ViewModel.IsMouseJumpEnabled, Mode=OneWay}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE740;}" <controls:SettingsCard.Description>
IsEnabled="{x:Bind ViewModel.IsMouseJumpEnabled, Mode=OneWay}">
<labs:SettingsCard.Description>
<StackPanel <StackPanel
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@ -289,7 +271,7 @@
Foreground="{ThemeResource SystemBaseMediumColor}" Foreground="{ThemeResource SystemBaseMediumColor}"
Style="{ThemeResource SecondaryTextStyle}" /> Style="{ThemeResource SecondaryTextStyle}" />
</StackPanel> </StackPanel>
</labs:SettingsCard.Description> </controls:SettingsCard.Description>
<StackPanel <StackPanel
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -325,58 +307,52 @@
</Button.Flyout> </Button.Flyout>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseUtils_MousePointerCrosshairs"> <custom:SettingsGroup x:Uid="MouseUtils_MousePointerCrosshairs">
<labs:SettingsCard <controls:SettingsCard
x:Uid="MouseUtils_Enable_MousePointerCrosshairs" x:Uid="MouseUtils_Enable_MousePointerCrosshairs"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseCrosshairs.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseCrosshairs.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="MouseUtils_MousePointerCrosshairs_ActivationShortcut" x:Uid="MouseUtils_MousePointerCrosshairs_ActivationShortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}" IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}"
IsExpanded="True"> IsExpanded="True">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MousePointerCrosshairsActivationShortcut, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" <controls:SettingsExpander.Items>
HotkeySettings="{x:Bind Path=ViewModel.MousePointerCrosshairsActivationShortcut, Mode=TwoWay}" /> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsExpander.Items> <CheckBox x:Uid="MouseUtils_AutoActivate" IsChecked="{x:Bind ViewModel.MousePointerCrosshairsAutoActivate, Mode=TwoWay}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<CheckBox </controls:SettingsExpander.Items>
x:Uid="MouseUtils_AutoActivate" </controls:SettingsExpander>
IsChecked="{x:Bind ViewModel.MousePointerCrosshairsAutoActivate, Mode=TwoWay}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="Appearance_Behavior" x:Uid="Appearance_Behavior"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEB3C;}" HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}"> IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsColor"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsColor">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MousePointerCrosshairsColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MousePointerCrosshairsColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOpacity"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOpacity">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="1" Minimum="1"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsOpacity}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsOpacity}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsRadius"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsRadius">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="10" LargeChange="10"
@ -385,9 +361,9 @@
SmallChange="1" SmallChange="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsRadius}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsRadius}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsThickness"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsThickness">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="10" LargeChange="10"
@ -396,13 +372,13 @@
SmallChange="1" SmallChange="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsThickness}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsThickness}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsBorderColor"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsBorderColor">
<controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MousePointerCrosshairsBorderColor, Mode=TwoWay}" /> <custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MousePointerCrosshairsBorderColor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsBorderSize"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsBorderSize">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="2" LargeChange="2"
@ -411,23 +387,17 @@
SmallChange="1" SmallChange="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsBorderSize}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsBorderSize}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsAutoHide" IsChecked="{x:Bind ViewModel.MousePointerCrosshairsAutoHide, Mode=TwoWay}" />
x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsAutoHide" </controls:SettingsCard>
IsChecked="{x:Bind ViewModel.MousePointerCrosshairsAutoHide, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_IsCrosshairsFixedLengthEnabled"> <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_IsCrosshairsFixedLengthEnabled">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.MousePointerCrosshairsIsFixedLengthEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.MousePointerCrosshairsIsFixedLengthEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsFixedLength" IsEnabled="{x:Bind ViewModel.MousePointerCrosshairsIsFixedLengthEnabled, Mode=OneWay}">
x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsFixedLength"
IsEnabled="{x:Bind ViewModel.MousePointerCrosshairsIsFixedLengthEnabled, Mode=OneWay}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="10" LargeChange="10"
@ -435,24 +405,18 @@
SmallChange="1" SmallChange="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsFixedLength}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MousePointerCrosshairsFixedLength}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_MouseUtils" Link="https://aka.ms/PowerToysOverview_MouseUtilities" />
x:Uid="LearnMore_MouseUtils" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_MouseUtilities" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://devblogs.microsoft.com/oldnewthing/author/oldnewthing" Text="Raymond Chen's Find My Mouse" />
<controls:SettingsPageControl.SecondaryLinks> <custom:PageLink Link="https://michael-clayton.com/projects/fancymouse" Text="Michael Clayton's Mouse Jump (FancyMouse)" />
<controls:PageLink </custom:SettingsPageControl.SecondaryLinks>
Link="https://devblogs.microsoft.com/oldnewthing/author/oldnewthing" </custom:SettingsPageControl>
Text="Raymond Chen's Find My Mouse" />
<controls:PageLink
Link="https://michael-clayton.com/projects/fancymouse"
Text="Michael Clayton's Mouse Jump (FancyMouse)" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,27 +2,26 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.MouseWithoutBordersPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.MouseWithoutBordersPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitConverters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:ui="using:CommunityToolkit.WinUI.UI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
<converters:NegativeBoolToVisibilityConverter x:Key="negativeBoolToVisibilityConverter" /> <converters:BoolToVisibilityConverter x:Key="negativeBoolToVisibilityConverter" />
<toolkitConverters:BoolToObjectConverter <converters:BoolToObjectConverter
x:Key="OneRowMatrixBoolToNumberOfRowsConverter" x:Key="OneRowMatrixBoolToNumberOfRowsConverter"
FalseValue="2" FalseValue="2"
TrueValue="4" /> TrueValue="4" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png"> <custom:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ActivationSettings"> <custom:SettingsGroup x:Uid="MouseWithoutBorders_ActivationSettings">
<labs:SettingsCard <controls:SettingsCard
x:Uid="MouseWithoutBorders_Toggle_Enable" x:Uid="MouseWithoutBorders_Toggle_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
@ -30,28 +29,27 @@
x:Uid="ToggleSwitch" x:Uid="ToggleSwitch"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanBeEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanBeEnabled}"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" /> IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeySettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="MouseWithoutBorders_KeySettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander <controls:SettingsExpander
x:Name="MouseWithoutBorders_ConnectSettings" x:Name="MouseWithoutBorders_ConnectSettings"
x:Uid="MouseWithoutBorders_SecurityKey" x:Uid="MouseWithoutBorders_SecurityKey"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE8D7;}"
Glyph=&#xE8D7;}"
IsExpanded="{x:Bind Mode=TwoWay, Path=ViewModel.ConnectFieldsVisible}"> IsExpanded="{x:Bind Mode=TwoWay, Path=ViewModel.ConnectFieldsVisible}">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Right"> <controls:SettingsCard ContentAlignment="Right">
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<TextBox <TextBox
x:Name="ConnectSecurityKeyTextBox" x:Name="ConnectSecurityKeyTextBox"
Width="248" x:Uid="MWB_SecurityKeyLabel"
x:Uid="MWB_SecurityKeyLabel" /> Width="248" />
<TextBox <TextBox
x:Name="ConnectPCNameTextBox" x:Name="ConnectPCNameTextBox"
x:Uid="MWB_PCNameLabel" x:Uid="MWB_PCNameLabel"
@ -61,8 +59,8 @@
Command="{x:Bind Mode=OneTime, Path=ConnectCommand}" Command="{x:Bind Mode=OneTime, Path=ConnectCommand}"
Style="{StaticResource AccentButtonStyle}" /> Style="{StaticResource AccentButtonStyle}" />
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<TextBox IsReadOnly="True" Text="{x:Bind Mode=TwoWay, Path=ViewModel.SecurityKey}" /> <TextBox IsReadOnly="True" Text="{x:Bind Mode=TwoWay, Path=ViewModel.SecurityKey}" />
<Button <Button
@ -73,11 +71,11 @@
x:Uid="MouseWithoutBorders_Connect" x:Uid="MouseWithoutBorders_Connect"
Command="{x:Bind Mode=OneTime, Path=ShowConnectFieldsCommand}" Command="{x:Bind Mode=OneTime, Path=ShowConnectFieldsCommand}"
Style="{StaticResource AccentButtonStyle}" Style="{StaticResource AccentButtonStyle}"
Visibility="{x:Bind Path=ViewModel.ConnectFieldsVisible, Mode=OneWay, Converter={StaticResource negativeBoolToVisibilityConverter}}" /> Visibility="{x:Bind Path=ViewModel.ConnectFieldsVisible, Mode=OneWay, Converter={StaticResource negativeBoolToVisibilityConverter}, ConverterParameter=True}" />
</StackPanel> </StackPanel>
</labs:SettingsExpander> </controls:SettingsExpander>
<labs:SettingsCard x:Uid="MouseWithoutBorders_ThisMachineNameLabel"> <controls:SettingsCard x:Uid="MouseWithoutBorders_ThisMachineNameLabel">
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock <TextBlock
VerticalAlignment="Center" VerticalAlignment="Center"
@ -96,10 +94,10 @@
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_DeviceLayoutSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="MouseWithoutBorders_DeviceLayoutSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard <controls:SettingsCard
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}" Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}"
ContentAlignment="Vertical"> ContentAlignment="Vertical">
@ -125,10 +123,10 @@
Width="136" Width="136"
Height="90" Height="90"
Margin="4" Margin="4"
BorderThickness="2"
AllowDrop="{Binding Mode=OneWay, Path=Item.CanDragDrop}" AllowDrop="{Binding Mode=OneWay, Path=Item.CanDragDrop}"
Background="{ThemeResource SolidBackgroundFillColorBaseAltBrush}" Background="{ThemeResource SolidBackgroundFillColorBaseAltBrush}"
BorderBrush="{Binding Item.StatusBrush}" BorderBrush="{Binding Item.StatusBrush}"
BorderThickness="2"
CanDrag="{Binding Mode=OneWay, Path=Item.CanDragDrop}" CanDrag="{Binding Mode=OneWay, Path=Item.CanDragDrop}"
CornerRadius="4" CornerRadius="4"
DataContext="{Binding}" DataContext="{Binding}"
@ -161,14 +159,14 @@
</ItemsControl> </ItemsControl>
<Button HorizontalAlignment="Right" Command="{x:Bind Mode=OneTime, Path=ReconnectCommand}"> <Button HorizontalAlignment="Right" Command="{x:Bind Mode=OneTime, Path=ReconnectCommand}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock x:Uid="MouseWithoutBorders_ReconnectTooltip" TextWrapping="Wrap"/> <TextBlock x:Uid="MouseWithoutBorders_ReconnectTooltip" TextWrapping="Wrap" />
</ToolTipService.ToolTip> </ToolTipService.ToolTip>
<TextBlock x:Uid="MouseWithoutBorders_ReconnectButton" /> <TextBlock x:Uid="MouseWithoutBorders_ReconnectButton" />
</Button> </Button>
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="MouseWithoutBorders_CannotDragDropAsAdmin" x:Uid="MouseWithoutBorders_CannotDragDropAsAdmin"
@ -179,17 +177,17 @@
<labs:SettingsCard x:Uid="MouseWithoutBorders_MatrixOneRow"> <controls:SettingsCard x:Uid="MouseWithoutBorders_MatrixOneRow">
<ToggleSwitch x:Uid="MouseWithoutBorders_MatrixOneRow_ToggleSwitch" IsOn="{x:Bind ViewModel.MatrixOneRow, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_MatrixOneRow_ToggleSwitch" IsOn="{x:Bind ViewModel.MatrixOneRow, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ServiceSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanToggleUseService}"> <custom:SettingsGroup x:Uid="MouseWithoutBorders_ServiceSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanToggleUseService}">
<labs:SettingsCard x:Uid="MouseWithoutBorders_UseService"> <controls:SettingsCard x:Uid="MouseWithoutBorders_UseService">
<ToggleSwitch <ToggleSwitch
x:Uid="MouseWithoutBorders_UseService_ToggleSwitch" x:Uid="MouseWithoutBorders_UseService_ToggleSwitch"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
IsOn="{x:Bind ViewModel.UseService, Mode=TwoWay}" /> IsOn="{x:Bind ViewModel.UseService, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="MouseWithoutBorders_RunAsAdminText" x:Uid="MouseWithoutBorders_RunAsAdminText"
IsClosable="False" IsClosable="False"
@ -202,145 +200,134 @@
IsOpen="True" IsOpen="True"
IsTabStop="True" IsTabStop="True"
Severity="Warning" /> Severity="Warning" />
<labs:SettingsCard <controls:SettingsCard
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanUninstallService}"
x:Uid="MouseWithoutBorders_UninstallService" x:Uid="MouseWithoutBorders_UninstallService"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon Glyph=&#xE8A7;}"
Glyph=&#xE8A7;}"
Command="{x:Bind ViewModel.UninstallServiceEventHandler}" Command="{x:Bind ViewModel.UninstallServiceEventHandler}"
IsClickEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanUninstallService}" /> IsClickEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanUninstallService}"
</controls:SettingsGroup> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.CanUninstallService}" />
<controls:SettingsGroup x:Uid="MouseWithoutBorders_Settings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> </custom:SettingsGroup>
<labs:SettingsCard x:Uid="MouseWithoutBorders_WrapMouse"> <custom:SettingsGroup x:Uid="MouseWithoutBorders_Settings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsCard x:Uid="MouseWithoutBorders_WrapMouse">
<ToggleSwitch x:Uid="MouseWithoutBorders_WrapMouse_ToggleSwitch" IsOn="{x:Bind ViewModel.WrapMouse, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_WrapMouse_ToggleSwitch" IsOn="{x:Bind ViewModel.WrapMouse, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_ShareClipboard"> <controls:SettingsCard x:Uid="MouseWithoutBorders_ShareClipboard">
<ToggleSwitch x:Uid="MouseWithoutBorders_ShareClipboard_ToggleSwitch" IsOn="{x:Bind ViewModel.ShareClipboard, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_ShareClipboard_ToggleSwitch" IsOn="{x:Bind ViewModel.ShareClipboard, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_TransferFile"> <controls:SettingsCard x:Uid="MouseWithoutBorders_TransferFile">
<ToggleSwitch x:Uid="MouseWithoutBorders_TransferFile_ToggleSwitch" IsOn="{x:Bind ViewModel.TransferFile, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_TransferFile_ToggleSwitch" IsOn="{x:Bind ViewModel.TransferFile, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge"> <controls:SettingsCard x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge">
<ToggleSwitch x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge_ToggleSwitch" IsOn="{x:Bind ViewModel.HideMouseAtScreenEdge, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge_ToggleSwitch" IsOn="{x:Bind ViewModel.HideMouseAtScreenEdge, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_DrawMouseCursor"> <controls:SettingsCard x:Uid="MouseWithoutBorders_DrawMouseCursor">
<ToggleSwitch x:Uid="MouseWithoutBorders_DrawMouseCursor_ToggleSwitch" IsOn="{x:Bind ViewModel.DrawMouseCursor, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_DrawMouseCursor_ToggleSwitch" IsOn="{x:Bind ViewModel.DrawMouseCursor, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP"> <controls:SettingsCard x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP">
<ToggleSwitch x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP_ToggleSwitch" IsOn="{x:Bind ViewModel.ValidateRemoteMachineIP, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP_ToggleSwitch" IsOn="{x:Bind ViewModel.ValidateRemoteMachineIP, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_SameSubnetOnly"> <controls:SettingsCard x:Uid="MouseWithoutBorders_SameSubnetOnly">
<ToggleSwitch x:Uid="MouseWithoutBorders_SameSubnetOnly_ToggleSwitch" IsOn="{x:Bind ViewModel.SameSubnetOnly, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_SameSubnetOnly_ToggleSwitch" IsOn="{x:Bind ViewModel.SameSubnetOnly, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines"> <controls:SettingsCard x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines">
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockScreenSaverOnOtherMachines, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockScreenSaverOnOtherMachines, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_MoveMouseRelatively"> <controls:SettingsCard x:Uid="MouseWithoutBorders_MoveMouseRelatively">
<ToggleSwitch x:Uid="MouseWithoutBorders_MoveMouseRelatively_ToggleSwitch" IsOn="{x:Bind ViewModel.MoveMouseRelatively, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_MoveMouseRelatively_ToggleSwitch" IsOn="{x:Bind ViewModel.MoveMouseRelatively, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners"> <controls:SettingsCard x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners">
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockMouseAtScreenCorners, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockMouseAtScreenCorners, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages"> <controls:SettingsCard x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages">
<ToggleSwitch x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages_ToggleSwitch" IsOn="{x:Bind ViewModel.ShowClipboardAndNetworkStatusMessages, Mode=TwoWay}" /> <ToggleSwitch x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages_ToggleSwitch" IsOn="{x:Bind ViewModel.ShowClipboardAndNetworkStatusMessages, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeyboardShortcuts_Group" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="MouseWithoutBorders_KeyboardShortcuts_Group" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="MouseWithoutBorders_EasyMouseOption"> <controls:SettingsCard x:Uid="MouseWithoutBorders_EasyMouseOption">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.EasyMouseOptionIndex, Mode=TwoWay}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.EasyMouseOptionIndex, Mode=TwoWay}">
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Disabled" /> <ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Disabled" />
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Enabled" /> <ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Enabled" />
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Ctrl" /> <ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Ctrl" />
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Shift" /> <ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Shift" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_ToggleEasyMouseShortcut" <controls:SettingsCard x:Uid="MouseWithoutBorders_ToggleEasyMouseShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> <custom:ShortcutControl
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True" AllowDisable="True"
MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ToggleEasyMouseShortcut, Mode=TwoWay}" />
HotkeySettings="{x:Bind Path=ViewModel.ToggleEasyMouseShortcut, Mode=TwoWay}" /> </controls:SettingsCard>
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_LockMachinesShortcut" <controls:SettingsCard x:Uid="MouseWithoutBorders_LockMachinesShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> <custom:ShortcutControl
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True" AllowDisable="True"
MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.LockMachinesShortcut, Mode=TwoWay}" />
HotkeySettings="{x:Bind Path=ViewModel.LockMachinesShortcut, Mode=TwoWay}" /> </controls:SettingsCard>
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_Switch2AllPcShortcut" <controls:SettingsCard x:Uid="MouseWithoutBorders_Switch2AllPcShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> <custom:ShortcutControl
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True" AllowDisable="True"
MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.HotKeySwitch2AllPC, Mode=TwoWay}" />
HotkeySettings="{x:Bind Path=ViewModel.HotKeySwitch2AllPC, Mode=TwoWay}" /> </controls:SettingsCard>
</labs:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="MouseWithoutBorders_ReconnectShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
x:Uid="MouseWithoutBorders_ReconnectShortcut" <custom:ShortcutControl
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> MinWidth="{StaticResource SettingActionControlMinWidth}"
<controls:ShortcutControl AllowDisable="True"
AllowDisable="True" HotkeySettings="{x:Bind Path=ViewModel.ReconnectShortcut, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.ReconnectShortcut, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE92E;}"> <controls:SettingsCard x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xE92E;}">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SelectedSwitchBetweenMachineShortcutOptionsIndex, Mode=TwoWay}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SelectedSwitchBetweenMachineShortcutOptionsIndex, Mode=TwoWay}">
<!-- These should be in the same order as the array items in MouseWithoutBordersViewModel.cs --> <!-- These should be in the same order as the array items in MouseWithoutBordersViewModel.cs -->
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_F1" /> <ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_F1" />
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_1" /> <ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_1" />
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_Disabled" /> <ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_Disabled" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="MouseWithoutBorders_AdvancedSettings_Group" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="MouseWithoutBorders_AdvancedSettings_Group" <controls:SettingsExpander x:Uid="MouseWithoutBorders_IPAddressMapping" IsExpanded="True">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <controls:SettingsExpander.Items>
<labs:SettingsExpander <controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
x:Uid="MouseWithoutBorders_IPAddressMapping"
IsExpanded="True">
<labs:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Vertical"
HorizontalContentAlignment="Stretch">
<TextBox <TextBox
x:Uid="MouseWithoutBorders_IPAddressMapping_TextBoxControl" x:Uid="MouseWithoutBorders_IPAddressMapping_TextBoxControl"
MinWidth="240" MinHeight="160" MinWidth="240"
AcceptsReturn="True" MinHeight="160"
ScrollViewer.IsVerticalRailEnabled="True" AcceptsReturn="True"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollBarVisibility="Visible"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.Name2IP, UpdateSourceTrigger=PropertyChanged}" ScrollViewer.VerticalScrollMode="Enabled"
TextWrapping="Wrap" /> Text="{x:Bind Mode=TwoWay, Path=ViewModel.Name2IP, UpdateSourceTrigger=PropertyChanged}"
</labs:SettingsCard> TextWrapping="Wrap" />
</labs:SettingsExpander.Items> </controls:SettingsCard>
</labs:SettingsExpander> </controls:SettingsExpander.Items>
</controls:SettingsGroup> </controls:SettingsExpander>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_TroubleShooting" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> </custom:SettingsGroup>
<labs:SettingsCard <custom:SettingsGroup x:Uid="MouseWithoutBorders_TroubleShooting" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsCard
x:Uid="MouseWithoutBorders_AddFirewallRuleButtonControl" x:Uid="MouseWithoutBorders_AddFirewallRuleButtonControl"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon Glyph=&#xE8A7;}"
Glyph=&#xE8A7;}"
Command="{x:Bind ViewModel.AddFirewallRuleEventHandler}" Command="{x:Bind ViewModel.AddFirewallRuleEventHandler}"
IsClickEnabled="True" /> IsClickEnabled="True" />
<labs:SettingsCard x:Uid="MouseWithoutBorders_ShowOriginalUI"> <controls:SettingsCard x:Uid="MouseWithoutBorders_ShowOriginalUI">
<ToggleSwitch <ToggleSwitch
x:Uid="MouseWithoutBorders_ShowOriginalUI_ToggleSwitch" x:Uid="MouseWithoutBorders_ShowOriginalUI_ToggleSwitch"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
IsOn="{x:Bind ViewModel.ShowOriginalUI, Mode=TwoWay}" /> IsOn="{x:Bind ViewModel.ShowOriginalUI, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="LearnMore_MouseWithoutBorders" Link="https://aka.ms/PowerToysOverview_MouseWithoutBorders" /> <custom:PageLink x:Uid="LearnMore_MouseWithoutBorders" Link="https://aka.ms/PowerToysOverview_MouseWithoutBorders" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
<controls:SettingsPageControl.SecondaryLinks> <custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink Link="http://aka.ms/mm" Text="Mouse without Borders" /> <custom:PageLink Link="http://aka.ms/mm" Text="Mouse without Borders" />
<controls:PageLink Link="https://github.com/microsoft/PowerToys/blob/main/COMMUNITY.md#mouse-without-borders-original-contributors" Text="Truong Do (Đỗ Đức Trường) and other original contributors" /> <custom:PageLink Link="https://github.com/microsoft/PowerToys/blob/main/COMMUNITY.md#mouse-without-borders-original-contributors" Text="Truong Do (Đỗ Đức Trường) and other original contributors" />
</controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -3,14 +3,9 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System; using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO.Abstractions; using System.IO.Abstractions;
using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
using System.Xml.Linq;
using CommunityToolkit.Labs.WinUI;
using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Utilities; using Microsoft.PowerToys.Settings.UI.Library.Utilities;

View File

@ -2,28 +2,26 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PastePlainPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.PastePlainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="PastePlain" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PastePlain.png">
x:Uid="PastePlain" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PastePlain.png"> <StackPanel
<controls:SettingsPageControl.ModuleContent> ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical"
Orientation="Vertical" Spacing="2"> Spacing="2">
<labs:SettingsCard <controls:SettingsCard
x:Uid="PastePlain_EnableToggleControl_HeaderText" x:Uid="PastePlain_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPastePlain.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPastePlain.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -31,31 +29,22 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="Shortcut" <controls:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
x:Uid="Activation_Shortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="PastePlain_ShortcutWarning" x:Uid="PastePlain_ShortcutWarning"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsConflictingCopyShortcut}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsConflictingCopyShortcut}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsConflictingCopyShortcut}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsConflictingCopyShortcut}"
Severity="Warning" /> Severity="Warning" />
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_PastePlain" Link="https://aka.ms/PowerToysOverview_PastePlain" />
x:Uid="LearnMore_PastePlain" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_PastePlain" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,23 +2,23 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PeekPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.PeekPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl x:Uid="Peek" ModuleImageSource="ms-appx:///Assets/Settings/Modules/Peek.png"> <custom:SettingsPageControl x:Uid="Peek" ModuleImageSource="ms-appx:///Assets/Settings/Modules/Peek.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="Peek_EnablePeek" x:Uid="Peek_EnablePeek"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPeek.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPeek.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" /> <ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -26,28 +26,24 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup x:Uid="Peek_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="Peek_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEDA7;}"> <controls:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" /> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Peek_BehaviorHeader" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:SettingsGroup x:Uid="Peek_BehaviorHeader" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="Peek_AlwaysRunNotElevated" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7EF;}"> <controls:SettingsCard x:Uid="Peek_AlwaysRunNotElevated" HeaderIcon="{ui:FontIcon Glyph=&#xE7EF;}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.AlwaysRunNotElevated}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.AlwaysRunNotElevated}" /> <controls:SettingsCard x:Uid="Peek_CloseAfterLosingFocus">
</labs:SettingsCard> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.CloseAfterLosingFocus}" />
<labs:SettingsCard x:Uid="Peek_CloseAfterLosingFocus"> </controls:SettingsCard>
<ToggleSwitch </custom:SettingsGroup>
x:Uid="ToggleSwitch"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.CloseAfterLosingFocus}" />
</labs:SettingsCard>
</controls:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="LearnMore_Peek" Link="https://aka.ms/PowerToysOverview_Peek" /> <custom:PageLink x:Uid="LearnMore_Peek" Link="https://aka.ms/PowerToysOverview_Peek" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -2,28 +2,26 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerAccentPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerAccentPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl
x:Uid="QuickAccent" x:Uid="QuickAccent"
IsTabStop="False" IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerAccent.png"> ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerAccent.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="QuickAccent_EnableQuickAccent" x:Uid="QuickAccent_EnableQuickAccent"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerAccent.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerAccent.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -32,36 +30,22 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="QuickAccent_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="QuickAccent_Activation_GroupSettings" <controls:SettingsCard x:Uid="QuickAccent_Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.ActivationKey, Mode=TwoWay}">
<labs:SettingsCard
x:Uid="QuickAccent_Activation_Shortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEDA7;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Path=ViewModel.ActivationKey, Mode=TwoWay}">
<ComboBoxItem x:Uid="QuickAccent_Activation_Key_Arrows" /> <ComboBoxItem x:Uid="QuickAccent_Activation_Key_Arrows" />
<ComboBoxItem x:Uid="QuickAccent_Activation_Key_Space" /> <ComboBoxItem x:Uid="QuickAccent_Activation_Key_Space" />
<ComboBoxItem x:Uid="QuickAccent_Activation_Key_Either" /> <ComboBoxItem x:Uid="QuickAccent_Activation_Key_Either" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="QuickAccent_Language" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="QuickAccent_Language" <controls:SettingsCard x:Uid="QuickAccent_SelectedLanguage" HeaderIcon="{ui:FontIcon Glyph=&#xF2B7;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SelectedLangIndex, Mode=TwoWay}">
<labs:SettingsCard
x:Uid="QuickAccent_SelectedLanguage"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xF2B7;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Path=ViewModel.SelectedLangIndex, Mode=TwoWay}">
<!-- These should be in the same order as the array items in PowerAccentViewModel.cs --> <!-- These should be in the same order as the array items in PowerAccentViewModel.cs -->
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_All" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_All" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Catalan"/> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Catalan" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Currency" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Currency" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Croatian" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Croatian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Czech" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Czech" />
@ -91,19 +75,12 @@
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Turkish" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Turkish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Welsh" /> <ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Welsh" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="QuickAccent_Toolbar" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
x:Uid="QuickAccent_Toolbar" <controls:SettingsCard x:Uid="QuickAccent_ToolbarPosition" HeaderIcon="{ui:FontIcon Glyph=&#xEC12;}">
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.ToolbarPositionIndex, Mode=TwoWay}">
<labs:SettingsCard
x:Uid="QuickAccent_ToolbarPosition"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEC12;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Path=ViewModel.ToolbarPositionIndex, Mode=TwoWay}">
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_TopCenter" /> <ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_TopCenter" />
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_BottomCenter" /> <ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_BottomCenter" />
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_Left" /> <ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_Left" />
@ -114,25 +91,20 @@
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_BottomLeftCorner" /> <ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_BottomLeftCorner" />
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_Center" /> <ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_Center" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="QuickAccent_Description_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE946;}"> <controls:SettingsCard x:Uid="QuickAccent_Description_Indicator" HeaderIcon="{ui:FontIcon Glyph=&#xE946;}">
<ToggleSwitch x:Uid="QuickAccent_UnicodeDescription_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.ShowUnicodeDescription}" /> <ToggleSwitch x:Uid="QuickAccent_UnicodeDescription_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.ShowUnicodeDescription}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="QuickAccent_SortByUsageFrequency_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE8CB;}"> <controls:SettingsCard x:Uid="QuickAccent_SortByUsageFrequency_Indicator" HeaderIcon="{ui:FontIcon Glyph=&#xE8CB;}">
<ToggleSwitch x:Uid="QuickAccent_SortByUsageFrequency_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SortByUsageFrequency}" /> <ToggleSwitch x:Uid="QuickAccent_SortByUsageFrequency_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SortByUsageFrequency}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="QuickAccent_StartSelectionFromTheLeft_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE974;}"> <controls:SettingsCard x:Uid="QuickAccent_StartSelectionFromTheLeft_Indicator" HeaderIcon="{ui:FontIcon Glyph=&#xE974;}">
<ToggleSwitch x:Uid="QuickAccent_StartSelectionFromTheLeft_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.StartSelectionFromTheLeft}" /> <ToggleSwitch x:Uid="QuickAccent_StartSelectionFromTheLeft_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.StartSelectionFromTheLeft}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="QuickAccent_Behavior" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="QuickAccent_Behavior" <controls:SettingsCard x:Uid="QuickAccent_InputTimeMs" HeaderIcon="{ui:FontIcon Glyph=&#xE916;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard
x:Uid="QuickAccent_InputTimeMs"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xE916;}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="100" LargeChange="100"
@ -140,16 +112,11 @@
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.InputTimeMs}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.InputTimeMs}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsExpander <controls:SettingsExpander x:Uid="QuickAccent_ExcludedApps" HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}">
x:Uid="QuickAccent_ExcludedApps" <controls:SettingsExpander.Items>
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, <controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
Glyph=&#xECE4;}">
<labs:SettingsExpander.Items>
<labs:SettingsCard
HorizontalContentAlignment="Stretch"
ContentAlignment="Vertical">
<TextBox <TextBox
x:Uid="QuickAccent_ExcludedApps_TextBoxControl" x:Uid="QuickAccent_ExcludedApps_TextBoxControl"
MinWidth="240" MinWidth="240"
@ -160,22 +127,18 @@
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}" Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_QuickAccent" Link="https://aka.ms/PowerToysOverview_QuickAccent" />
x:Uid="LearnMore_QuickAccent" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_QuickAccent" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://github.com/damienleroy/PowerAccent" Text="Damien Leroy's PowerAccent" />
<controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink </custom:SettingsPageControl>
Link="https://github.com/damienleroy/PowerAccent"
Text="Damien Leroy's PowerAccent" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -3,30 +3,26 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ViewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels" xmlns:ViewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:ic="using:Microsoft.Xaml.Interactions.Core" xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="PowerLauncher" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerLauncher.png">
x:Uid="PowerLauncher" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerLauncher.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="PowerLauncher_EnablePowerLauncher" x:Uid="PowerLauncher_EnablePowerLauncher"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerToysRun.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerToysRun.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnablePowerLauncher, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.EnablePowerLauncher, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -34,31 +30,22 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
x:Uid="Shortcut" <controls:SettingsExpander
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
<labs:SettingsExpander
x:Uid="Activation_Shortcut" x:Uid="Activation_Shortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
Glyph=&#xEDA7;}"
IsExpanded="True"> IsExpanded="True">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" <controls:SettingsExpander.Items>
HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}" /> <controls:SettingsCard ContentAlignment="Left">
<labs:SettingsExpander.Items> <custom:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_UseCentralizedKeyboardHook" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}" />
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsCard>
<controls:CheckBoxWithDescriptionControl <controls:SettingsCard ContentAlignment="Left">
x:Uid="PowerLauncher_UseCentralizedKeyboardHook" <CheckBox x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}" />
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}" /> </controls:SettingsCard>
</labs:SettingsCard> </controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Left"> </controls:SettingsExpander>
<CheckBox </custom:SettingsGroup>
x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
<!--<Custom:HotkeySettingsControl x:Uid="PowerLauncher_OpenFileLocation" <!--<Custom:HotkeySettingsControl x:Uid="PowerLauncher_OpenFileLocation"
@ -94,19 +81,14 @@
IsEnabled="False" IsEnabled="False"
/>--> />-->
<controls:SettingsGroup <custom:SettingsGroup x:Uid="PowerLauncher_SearchResults" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
x:Uid="PowerLauncher_SearchResults" <controls:SettingsExpander
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
<labs:SettingsExpander
x:Uid="PowerLauncher_SearchQueryResultsWithDelay" x:Uid="PowerLauncher_SearchQueryResultsWithDelay"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xec48;}"
Glyph=&#xec48;}"
IsExpanded="True"> IsExpanded="True">
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryResultsWithDelay}" /> <ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryResultsWithDelay}" />
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_FastSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}">
x:Uid="PowerLauncher_FastSearchInputDelayMs"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="50" LargeChange="50"
@ -115,10 +97,8 @@
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_SlowSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}">
x:Uid="PowerLauncher_SlowSearchInputDelayMs"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="50" LargeChange="50"
@ -127,39 +107,33 @@
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="PowerLauncher_MaximumNumberOfResults" x:Uid="PowerLauncher_MaximumNumberOfResults"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xec8f;}"
Glyph=&#xec8f;}"
IsExpanded="True"> IsExpanded="True">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Minimum="1" Minimum="1"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}" /> Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}" />
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="PowerLauncher_ClearInputOnLaunch" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ClearInputOnLaunch}" />
x:Uid="PowerLauncher_ClearInputOnLaunch" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ClearInputOnLaunch}" /> </controls:SettingsExpander.Items>
</labs:SettingsCard> </controls:SettingsExpander>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="PowerLauncher_SearchQueryTuningEnabled" x:Uid="PowerLauncher_SearchQueryTuningEnabled"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE8CB;}"
Glyph=&#xE8CB;}"
IsExpanded="True"> IsExpanded="True">
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryTuningEnabled}" /> <ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryTuningEnabled}" />
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_SearchClickedItemWeight" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
x:Uid="PowerLauncher_SearchClickedItemWeight"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="50" LargeChange="50"
@ -168,34 +142,22 @@
SmallChange="5" SmallChange="5"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchClickedItemWeight}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchClickedItemWeight}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
ContentAlignment="Left" <custom:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_WaitForSlowResults" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}" />
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}"> </controls:SettingsCard>
<controls:CheckBoxWithDescriptionControl </controls:SettingsExpander.Items>
x:Uid="PowerLauncher_WaitForSlowResults" </controls:SettingsExpander>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_TabSelectsContextButtons" HeaderIcon="{ui:FontIcon Glyph=&#xE7FD;}">
x:Uid="PowerLauncher_TabSelectsContextButtons" <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.TabSelectsContextButtons, Mode=TwoWay}" />
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7FD;}"> </controls:SettingsCard>
<ToggleSwitch
x:Uid="ToggleSwitch"
IsOn="{x:Bind ViewModel.TabSelectsContextButtons, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_GenerateThumbnailsFromFiles">
x:Uid="PowerLauncher_GenerateThumbnailsFromFiles" <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.GenerateThumbnailsFromFiles, Mode=TwoWay}" />
> </controls:SettingsCard>
<ToggleSwitch
x:Uid="ToggleSwitch"
IsOn="{x:Bind ViewModel.GenerateThumbnailsFromFiles, Mode=TwoWay}" />
</labs:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference" <!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference"
MinWidth="320" MinWidth="320"
@ -217,44 +179,28 @@
IsEnabled="False" IsEnabled="False"
/>--> />-->
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Run_PositionAppearance_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
x:Uid="Run_PositionAppearance_GroupSettings" <controls:SettingsCard x:Uid="Run_PositionHeader" HeaderIcon="{ui:FontIcon Glyph=&#xe78b;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MonitorPositionIndex}">
<labs:SettingsCard
x:Uid="Run_PositionHeader"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xe78b;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MonitorPositionIndex}">
<ComboBoxItem x:Uid="Run_Radio_Position_Cursor" /> <ComboBoxItem x:Uid="Run_Radio_Position_Cursor" />
<ComboBoxItem x:Uid="Run_Radio_Position_Primary_Monitor" /> <ComboBoxItem x:Uid="Run_Radio_Position_Primary_Monitor" />
<ComboBoxItem x:Uid="Run_Radio_Position_Focus" /> <ComboBoxItem x:Uid="Run_Radio_Position_Focus" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=&#xE790;}">
x:Uid="ColorModeHeader" <controls:SettingsCard.Description>
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, <HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
Glyph=&#xE790;}"> </controls:SettingsCard.Description>
<labs:SettingsCard.Description> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}">
<HyperlinkButton
x:Uid="Windows_Color_Settings"
Click="OpenColorsSettings_Click" />
</labs:SettingsCard.Description>
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}">
<ComboBoxItem x:Uid="Radio_Theme_Dark" /> <ComboBoxItem x:Uid="Radio_Theme_Dark" />
<ComboBoxItem x:Uid="Radio_Theme_Light" /> <ComboBoxItem x:Uid="Radio_Theme_Light" />
<ComboBoxItem x:Uid="Radio_Theme_Default" /> <ComboBoxItem x:Uid="Radio_Theme_Default" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="PowerLauncher_Plugins" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
x:Uid="PowerLauncher_Plugins"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
<InfoBar <InfoBar
x:Uid="Run_ConflictingKeywordInfo" x:Uid="Run_ConflictingKeywordInfo"
@ -263,23 +209,17 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
Severity="Informational"> Severity="Informational">
<InfoBar.ActionButton> <InfoBar.ActionButton>
<HyperlinkButton <HyperlinkButton x:Uid="Run_ConflictingKeywordInfo_Link" NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun#direct-activation-commands" />
x:Uid="Run_ConflictingKeywordInfo_Link"
NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun#direct-activation-commands" />
</InfoBar.ActionButton> </InfoBar.ActionButton>
</InfoBar> </InfoBar>
<labs:SettingsCard <controls:SettingsCard x:Uid="Run_PluginUse" HeaderIcon="{ui:FontIcon Glyph=&#xEA86;}">
x:Uid="Run_PluginUse" <controls:SettingsCard.Description>
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEA86;}">
<labs:SettingsCard.Description>
<StackPanel> <StackPanel>
<TextBlock x:Uid="Run_PluginUseDescription" /> <TextBlock x:Uid="Run_PluginUseDescription" />
<HyperlinkButton <HyperlinkButton x:Uid="Run_PluginUseFindMorePlugins" NavigateUri="https://aka.ms/powerToysRunPlugins" />
x:Uid="Run_PluginUseFindMorePlugins"
NavigateUri="https://aka.ms/powerToysRunPlugins" />
</StackPanel> </StackPanel>
</labs:SettingsCard.Description> </controls:SettingsCard.Description>
<AutoSuggestBox <AutoSuggestBox
x:Uid="PowerLauncher_SearchList" x:Uid="PowerLauncher_SearchList"
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
@ -291,7 +231,7 @@
</ic:EventTriggerBehavior> </ic:EventTriggerBehavior>
</i:Interaction.Behaviors> </i:Interaction.Behaviors>
</AutoSuggestBox> </AutoSuggestBox>
</labs:SettingsCard> </controls:SettingsCard>
@ -302,9 +242,7 @@
IsTabStop="{x:Bind ViewModel.ShowAllPluginsDisabledWarning, Mode=OneWay}" IsTabStop="{x:Bind ViewModel.ShowAllPluginsDisabledWarning, Mode=OneWay}"
Severity="Error" /> Severity="Error" />
<StackPanel <StackPanel Orientation="Horizontal" Visibility="{x:Bind ViewModel.ShowPluginsLoadingMessage, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
Orientation="Horizontal"
Visibility="{x:Bind ViewModel.ShowPluginsLoadingMessage, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
<ProgressRing <ProgressRing
Width="20" Width="20"
Height="20" Height="20"
@ -316,28 +254,20 @@
Style="{ThemeResource SecondaryTextStyle}" /> Style="{ThemeResource SecondaryTextStyle}" />
</StackPanel> </StackPanel>
<ItemsControl <ItemsControl x:Name="PluginsListView" ItemsSource="{x:Bind Path=ViewModel.Plugins, Mode=OneWay}">
x:Name="PluginsListView"
ItemsSource="{x:Bind Path=ViewModel.Plugins, Mode=OneWay}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Spacing="2" /> <StackPanel Spacing="2" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate <DataTemplate x:DataType="ViewModels:PowerLauncherPluginViewModel" x:DefaultBindMode="OneWay">
x:DataType="ViewModels:PowerLauncherPluginViewModel"
x:DefaultBindMode="OneWay">
<Grid> <Grid>
<labs:SettingsExpander <controls:SettingsExpander Description="{x:Bind Description}" Header="{x:Bind Path=Name}">
Description="{x:Bind Description}" <controls:SettingsExpander.HeaderIcon>
Header="{x:Bind Path=Name}">
<labs:SettingsExpander.HeaderIcon>
<BitmapIcon UriSource="{x:Bind IconPath}" /> <BitmapIcon UriSource="{x:Bind IconPath}" />
</labs:SettingsExpander.HeaderIcon> </controls:SettingsExpander.HeaderIcon>
<StackPanel <StackPanel Orientation="Horizontal" Spacing="16">
Orientation="Horizontal"
Spacing="16">
<!-- todo(Stefan): InfoBadge not available <!-- todo(Stefan): InfoBadge not available
<InfoBadge AutomationProperties.AccessibilityView="Raw" <InfoBadge AutomationProperties.AccessibilityView="Raw"
Visibility="{x:Bind ShowBadgeOnPluginSettingError}" Visibility="{x:Bind ShowBadgeOnPluginSettingError}"
@ -359,19 +289,13 @@
Visibility="{x:Bind ShowBadgeOnPluginSettingError}" /> Visibility="{x:Bind ShowBadgeOnPluginSettingError}" />
</Grid> </Grid>
<ToggleSwitch <ToggleSwitch x:Uid="PowerLauncher_EnablePluginToggle" IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}" />
x:Uid="PowerLauncher_EnablePluginToggle"
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}" />
</StackPanel> </StackPanel>
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_ActionKeyword" IsEnabled="{x:Bind Enabled, Mode=OneWay}">
x:Uid="PowerLauncher_ActionKeyword" <TextBox MinWidth="{StaticResource SettingActionControlMinWidth}" Text="{x:Bind Path=ActionKeyword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
IsEnabled="{x:Bind Enabled, Mode=OneWay}"> </controls:SettingsCard>
<TextBox <controls:SettingsCard
MinWidth="{StaticResource SettingActionControlMinWidth}"
Text="{x:Bind Path=ActionKeyword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</labs:SettingsCard>
<labs:SettingsCard
Padding="0,-4,0,0" Padding="0,-4,0,0"
HorizontalContentAlignment="Left" HorizontalContentAlignment="Left"
Background="{ThemeResource SystemFillColorCriticalBackgroundBrush}" Background="{ThemeResource SystemFillColorCriticalBackgroundBrush}"
@ -386,28 +310,22 @@
IsOpen="True" IsOpen="True"
IsTabStop="{x:Bind ShowNotAccessibleWarning}" IsTabStop="{x:Bind ShowNotAccessibleWarning}"
Severity="Error" /> Severity="Error" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Enabled, Mode=OneWay}">
ContentAlignment="Left"
IsEnabled="{x:Bind Enabled, Mode=OneWay}">
<CheckBox <CheckBox
Margin="0,-8,0,0" Margin="0,-8,0,0"
AutomationProperties.Name="{Binding ElementName=IncludeInGlobalResultTitle, Path=Text}" AutomationProperties.Name="{Binding ElementName=IncludeInGlobalResultTitle, Path=Text}"
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"> IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}">
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock <TextBlock x:Name="IncludeInGlobalResultTitle" x:Uid="PowerLauncher_IncludeInGlobalResultTitle" />
x:Name="IncludeInGlobalResultTitle" <custom:IsEnabledTextBlock
x:Uid="PowerLauncher_IncludeInGlobalResultTitle" />
<controls:IsEnabledTextBlock
x:Uid="PowerLauncher_IncludeInGlobalResultDescription" x:Uid="PowerLauncher_IncludeInGlobalResultDescription"
FontSize="{StaticResource SecondaryTextFontSize}" FontSize="{StaticResource SecondaryTextFontSize}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
</StackPanel> </StackPanel>
</CheckBox> </CheckBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerLauncher_PluginWeightBoost" IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
x:Uid="PowerLauncher_PluginWeightBoost"
IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="50" LargeChange="50"
@ -416,15 +334,15 @@
SmallChange="10" SmallChange="10"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=WeightBoost}" /> Value="{x:Bind Mode=TwoWay, Path=WeightBoost}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
MinHeight="0" MinHeight="0"
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
ContentAlignment="Vertical"> ContentAlignment="Vertical">
<labs:SettingsCard.Resources> <controls:SettingsCard.Resources>
<Thickness x:Key="SettingsCardPadding">0</Thickness> <Thickness x:Key="SettingsCardPadding">0</Thickness>
<Thickness x:Key="SettingsExpanderItemPadding">0,0,0,0</Thickness> <Thickness x:Key="SettingsExpanderItemPadding">0,0,0,0</Thickness>
</labs:SettingsCard.Resources> </controls:SettingsCard.Resources>
<ItemsControl <ItemsControl
Margin="0,-6,0,0" Margin="0,-6,0,0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@ -433,10 +351,8 @@
ItemsSource="{x:Bind Path=AdditionalOptions}"> ItemsSource="{x:Bind Path=AdditionalOptions}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="ViewModels:PluginAdditionalOptionViewModel"> <DataTemplate x:DataType="ViewModels:PluginAdditionalOptionViewModel">
<StackPanel <StackPanel HorizontalAlignment="Stretch" Orientation="Vertical">
HorizontalAlignment="Stretch" <controls:SettingsCard
Orientation="Vertical">
<labs:SettingsCard
MinHeight="0" MinHeight="0"
Margin="1" Margin="1"
Padding="0,6,0,12" Padding="0,6,0,12"
@ -445,12 +361,12 @@
ContentAlignment="Left" ContentAlignment="Left"
CornerRadius="0"> CornerRadius="0">
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<controls:CheckBoxWithDescriptionControl <custom:CheckBoxWithDescriptionControl
Margin="56,0,0,0" Margin="56,0,0,0"
Description="{x:Bind Path=DisplayDescription}" Description="{x:Bind Path=DisplayDescription}"
Header="{x:Bind Path=DisplayLabel}" Header="{x:Bind Path=DisplayLabel}"
IsChecked="{x:Bind Path=Value, Mode=TwoWay}" IsChecked="{x:Bind Path=Value, Mode=TwoWay}"
Visibility="{x:Bind Path=ShowCheckBox, Converter={StaticResource BoolToVisibilityConverter}}"/> Visibility="{x:Bind Path=ShowCheckBox, Converter={StaticResource BoolToVisibilityConverter}}" />
<ComboBox <ComboBox
Margin="56,0,0,0" Margin="56,0,0,0"
Description="{x:Bind Path=DisplayDescription}" Description="{x:Bind Path=DisplayDescription}"
@ -459,7 +375,7 @@
SelectedIndex="{x:Bind Path=Option, Mode=TwoWay}" SelectedIndex="{x:Bind Path=Option, Mode=TwoWay}"
Visibility="{x:Bind Path=ShowComboBox, Converter={StaticResource BoolToVisibilityConverter}}" /> Visibility="{x:Bind Path=ShowComboBox, Converter={StaticResource BoolToVisibilityConverter}}" />
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
<Rectangle <Rectangle
Height="1" Height="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@ -468,43 +384,33 @@
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
MinHeight="0" MinHeight="0"
BorderThickness="0" BorderThickness="0"
ContentAlignment="Right"> ContentAlignment="Right">
<TextBlock <TextBlock Opacity="{x:Bind DisabledOpacity}" Style="{ThemeResource SecondaryTextStyle}">
Opacity="{x:Bind DisabledOpacity}"
Style="{ThemeResource SecondaryTextStyle}">
<Run x:Uid="PowerLauncher_AuthoredBy" /> <Run x:Uid="PowerLauncher_AuthoredBy" />
<Run FontWeight="SemiBold" Text="{x:Bind Author}" /> <Run FontWeight="SemiBold" Text="{x:Bind Author}" />
</TextBlock> </TextBlock>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_Run" Link="https://aka.ms/PowerToysOverview_PowerToysRun" />
x:Uid="LearnMore_Run" <custom:PageLink x:Uid="Run_FindMorePlugins" Link="https://aka.ms/powerToysRunPlugins" />
Link="https://aka.ms/PowerToysOverview_PowerToysRun" /> </custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:SettingsPageControl.SecondaryLinks>
x:Uid="Run_FindMorePlugins" <custom:PageLink Link="https://github.com/Wox-launcher/Wox/" Text="Wox" />
Link="https://aka.ms/powerToysRunPlugins" /> <custom:PageLink Link="https://github.com/betsegaw/windowwalker/" Text="Beta Tadele's Window Walker" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.SecondaryLinks>
<controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl>
<controls:PageLink
Link="https://github.com/Wox-launcher/Wox/"
Text="Wox" />
<controls:PageLink
Link="https://github.com/betsegaw/windowwalker/"
Text="Beta Tadele's Window Walker" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,28 +2,26 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerOcrPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerOcrPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="TextExtractor" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerOCR.png">
x:Uid="TextExtractor" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerOCR.png"> <StackPanel
<controls:SettingsPageControl.ModuleContent> ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical"
Orientation="Vertical" Spacing="2"> Spacing="2">
<labs:SettingsCard <controls:SettingsCard
x:Uid="TextExtractor_EnableToggleControl_HeaderText" x:Uid="TextExtractor_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerOcr.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerOcr.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -37,48 +35,33 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
Severity="Informational"> Severity="Informational">
<InfoBar.ActionButton> <InfoBar.ActionButton>
<HyperlinkButton <HyperlinkButton x:Uid="TextExtractor_SupportedLanguages_Link" NavigateUri="https://aka.ms/PowerToysOverview_TextExtractor#supported-languages" />
x:Uid="TextExtractor_SupportedLanguages_Link"
NavigateUri="https://aka.ms/PowerToysOverview_TextExtractor#supported-languages" />
</InfoBar.ActionButton> </InfoBar.ActionButton>
</InfoBar> </InfoBar>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="Shortcut" <controls:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
x:Uid="Activation_Shortcut" <controls:SettingsCard x:Uid="TextExtractor_Languages">
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard
x:Uid="TextExtractor_Languages">
<ComboBox <ComboBox
x:Name="TextExtractor_ComboBox" x:Name="TextExtractor_ComboBox"
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
DropDownOpened="TextExtractor_ComboBox_DropDownOpened"
ItemsSource="{x:Bind Path=ViewModel.AvailableLanguages, Mode=OneWay}" ItemsSource="{x:Bind Path=ViewModel.AvailableLanguages, Mode=OneWay}"
SelectedIndex="{x:Bind Path=ViewModel.LanguageIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValue="{Binding SelectedColorRepresentationValue, Mode=TwoWay}"
Loaded="TextExtractor_ComboBox_Loaded" Loaded="TextExtractor_ComboBox_Loaded"
DropDownOpened="TextExtractor_ComboBox_DropDownOpened"> SelectedIndex="{x:Bind Path=ViewModel.LanguageIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
</ComboBox> SelectedValue="{Binding SelectedColorRepresentationValue, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_TextExtractor" Link="https://aka.ms/PowerToysOverview_TextExtractor" />
x:Uid="LearnMore_TextExtractor" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_TextExtractor" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://github.com/TheJoeFin/Text-Grab" Text="Based upon Joseph Finney's Text Grab" />
<controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink </custom:SettingsPageControl>
Link="https://github.com/TheJoeFin/Text-Grab"
Text="Based upon Joseph Finney's Text Grab" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,59 +2,55 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerPreviewPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerPreviewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="FileExplorerPreview" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerPreview.png">
x:Uid="FileExplorerPreview" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerPreview.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsGroup x:Uid="FileExplorerPreview_PreviewPane">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<controls:SettingsGroup x:Uid="FileExplorerPreview_PreviewPane">
<InfoBar <InfoBar
x:Uid="FileExplorerPreview_PreviewHandlerOutlookIncompatibility" x:Uid="FileExplorerPreview_PreviewHandlerOutlookIncompatibility"
IsClosable="False" IsClosable="False"
IsOpen="True" IsOpen="True"
IsTabStop="True" IsTabStop="True"
Severity="Warning" /> Severity="Warning" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG" x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE91B;}" HeaderIcon="{ui:FontIcon Glyph=&#xE91B;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGRenderIsEnabled}" />
x:Uid="ToggleSwitch" <controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGRenderIsEnabled}" /> <controls:SettingsCard x:Uid="FileExplorerPreview_Preview_SVG_Color_Mode">
<labs:SettingsExpander.Items> <ComboBox
<labs:SettingsCard x:Uid="FileExplorerPreview_Preview_SVG_Color_Mode"> MinWidth="{StaticResource SettingActionControlMinWidth}"
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SVGRenderBackgroundColorMode, Mode=TwoWay}" IsEnabled="{x:Bind ViewModel.SVGRenderIsEnabled, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.SVGRenderIsEnabled, Mode=OneWay}"> SelectedIndex="{x:Bind Path=ViewModel.SVGRenderBackgroundColorMode, Mode=TwoWay}">
<ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Color_Mode_Default" /> <ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Color_Mode_Default" />
<ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Color_Solid_Color" /> <ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Color_Solid_Color" />
<ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade" /> <ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="FileExplorerPreview_Preview_SVG_Background_Color" <controls:SettingsCard x:Uid="FileExplorerPreview_Preview_SVG_Background_Color" Visibility="{x:Bind ViewModel.IsSvgBackgroundColorVisible, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
Visibility="{x:Bind ViewModel.IsSvgBackgroundColorVisible, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}"> <custom:ColorPickerButton IsEnabled="{x:Bind ViewModel.SVGRenderIsEnabled, Mode=OneWay}" SelectedColor="{x:Bind Path=ViewModel.SVGRenderBackgroundSolidColor, Mode=TwoWay}" />
<controls:ColorPickerButton </controls:SettingsCard>
<controls:SettingsCard x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_Mode" Visibility="{x:Bind ViewModel.IsSvgCheckeredShadeVisible, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
IsEnabled="{x:Bind ViewModel.SVGRenderIsEnabled, Mode=OneWay}" IsEnabled="{x:Bind ViewModel.SVGRenderIsEnabled, Mode=OneWay}"
SelectedColor="{x:Bind Path=ViewModel.SVGRenderBackgroundSolidColor, Mode=TwoWay}" /> SelectedIndex="{x:Bind Path=ViewModel.SVGRenderBackgroundCheckeredShade, Mode=TwoWay}">
</labs:SettingsCard>
<labs:SettingsCard x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_Mode"
Visibility="{x:Bind ViewModel.IsSvgCheckeredShadeVisible, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SVGRenderBackgroundCheckeredShade, Mode=TwoWay}"
IsEnabled="{x:Bind ViewModel.SVGRenderIsEnabled, Mode=OneWay}">
<ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_1" /> <ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_1" />
<ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_2" /> <ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_2" />
<ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_3" /> <ComboBoxItem x:Uid="FileExplorerPreview_Preview_SVG_Checkered_Shade_3" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -63,14 +59,12 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGRenderEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGRenderEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="FileExplorerPreview_ToggleSwitch_Preview_MD" x:Uid="FileExplorerPreview_ToggleSwitch_Preview_MD"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE943;}" HeaderIcon="{ui:FontIcon Glyph=&#xE943;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsMDRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsMDRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MDRenderIsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MDRenderIsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -80,41 +74,31 @@
Severity="Informational" /> Severity="Informational" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FileExplorerPreview_ToggleSwitch_Preview_Monaco" x:Uid="FileExplorerPreview_ToggleSwitch_Preview_Monaco"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE99A;}" HeaderIcon="{ui:FontIcon Glyph=&#xE99A;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsMonacoRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsMonacoRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MonacoRenderIsEnabled}" />
x:Uid="ToggleSwitch" <controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MonacoRenderIsEnabled}" /> <controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind ViewModel.MonacoRenderIsEnabled, Mode=OneWay}">
<labs:SettingsExpander.Items> <CheckBox x:Uid="FileExplorerPreview_ToggleSwitch_Monaco_Wrap_Text" IsChecked="{x:Bind ViewModel.MonacoWrapText, Mode=TwoWay}" />
<labs:SettingsCard </controls:SettingsCard>
ContentAlignment="Left" <controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind ViewModel.MonacoRenderIsEnabled, Mode=OneWay}">
IsEnabled="{x:Bind ViewModel.MonacoRenderIsEnabled, Mode=OneWay}"> <custom:CheckBoxWithDescriptionControl
<CheckBox
x:Uid="FileExplorerPreview_ToggleSwitch_Monaco_Wrap_Text"
IsChecked="{x:Bind ViewModel.MonacoWrapText, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard
ContentAlignment="Left"
IsEnabled="{x:Bind ViewModel.MonacoRenderIsEnabled, Mode=OneWay}">
<controls:CheckBoxWithDescriptionControl
x:Uid="FileExplorerPreview_ToggleSwitch_Monaco_Try_Format" x:Uid="FileExplorerPreview_ToggleSwitch_Monaco_Try_Format"
IsChecked="{x:Bind ViewModel.MonacoPreviewTryFormat, Mode=TwoWay}" IsChecked="{x:Bind ViewModel.MonacoPreviewTryFormat, Mode=TwoWay}"
IsEnabled="{x:Bind ViewModel.MonacoRenderIsEnabled, Mode=OneWay}" /> IsEnabled="{x:Bind ViewModel.MonacoRenderIsEnabled, Mode=OneWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="FileExplorerPreview_Toggle_Monaco_Max_File_Size" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.MonacoRenderIsEnabled}">
x:Uid="FileExplorerPreview_Toggle_Monaco_Max_File_Size"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.MonacoRenderIsEnabled}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="2" Minimum="2"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MonacoPreviewMaxFileSize}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MonacoPreviewMaxFileSize}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -123,37 +107,33 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsMonacoRenderEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsMonacoRenderEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="FileExplorerPreview_ToggleSwitch_Preview_PDF" x:Uid="FileExplorerPreview_ToggleSwitch_Preview_PDF"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEA90;}" HeaderIcon="{ui:FontIcon Glyph=&#xEA90;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFRenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PDFRenderIsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PDFRenderIsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFRenderEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFRenderEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFRenderEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFRenderEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="FileExplorerPreview_ToggleSwitch_Preview_GCODE" x:Uid="FileExplorerPreview_ToggleSwitch_Preview_GCODE"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE914;}" HeaderIcon="{ui:FontIcon Glyph=&#xE914;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODERenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODERenderEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.GCODERenderIsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.GCODERenderIsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODERenderEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODERenderEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODERenderEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODERenderEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup x:Uid="FileExplorerPreview_IconThumbnail_GroupSettings"> <custom:SettingsGroup x:Uid="FileExplorerPreview_IconThumbnail_GroupSettings">
<InfoBar <InfoBar
x:Uid="FileExplorerPreview_RebootRequired" x:Uid="FileExplorerPreview_RebootRequired"
IsClosable="False" IsClosable="False"
@ -166,42 +146,36 @@
IsOpen="True" IsOpen="True"
IsTabStop="True" IsTabStop="True"
Severity="Warning" /> Severity="Warning" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_SVG" x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_SVG"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE91B;}" HeaderIcon="{ui:FontIcon Glyph=&#xE91B;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGThumbnailIsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGThumbnailIsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGThumbnailEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGThumbnailEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGThumbnailEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsSVGThumbnailEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_PDF" x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_PDF"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xEA90;}" HeaderIcon="{ui:FontIcon Glyph=&#xEA90;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PDFThumbnailIsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PDFThumbnailIsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFThumbnailEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFThumbnailEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFThumbnailEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsPDFThumbnailEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<labs:SettingsCard <controls:SettingsCard
x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_GCODE" x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_GCODE"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE914;}" HeaderIcon="{ui:FontIcon Glyph=&#xE914;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODEThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsGCODEThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.GCODEThumbnailIsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.GCODEThumbnailIsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
@ -210,43 +184,33 @@
Severity="Informational" /> Severity="Informational" />
<labs:SettingsExpander <controls:SettingsExpander
x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_STL" x:Uid="FileExplorerPreview_ToggleSwitch_Thumbnail_STL"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE914;}" HeaderIcon="{ui:FontIcon Glyph=&#xE914;}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsSTLThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsSTLThumbnailEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.STLThumbnailIsEnabled}" />
x:Uid="ToggleSwitch" <controls:SettingsExpander.Items>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.STLThumbnailIsEnabled}" /> <controls:SettingsCard x:Uid="FileExplorerPreview_Color_Thumbnail_STL">
<labs:SettingsExpander.Items> <custom:ColorPickerButton IsEnabled="{x:Bind ViewModel.STLThumbnailIsEnabled, Mode=OneWay}" SelectedColor="{x:Bind Path=ViewModel.STLThumbnailColor, Mode=TwoWay}" />
<labs:SettingsCard x:Uid="FileExplorerPreview_Color_Thumbnail_STL"> </controls:SettingsCard>
<controls:ColorPickerButton </controls:SettingsExpander.Items>
IsEnabled="{x:Bind ViewModel.STLThumbnailIsEnabled, Mode=OneWay}" </controls:SettingsExpander>
SelectedColor="{x:Bind Path=ViewModel.STLThumbnailColor, Mode=TwoWay}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsSTLThumbnailEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsSTLThumbnailEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsSTLThumbnailEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsSTLThumbnailEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_PowerPreview" Link="https://aka.ms/PowerToysOverview_FileExplorerAddOns" />
x:Uid="LearnMore_PowerPreview" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_FileExplorerAddOns" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://blog.aaron-junker.ch" Text="Aaron Junker's work on developer file preview" />
<controls:SettingsPageControl.SecondaryLinks> <custom:PageLink Link="https://www.pedrolamas.com" Text="Pedro Lamas's work on G-Code and STL" />
<controls:PageLink </custom:SettingsPageControl.SecondaryLinks>
Link="https://blog.aaron-junker.ch" </custom:SettingsPageControl>
Text="Aaron Junker's work on developer file preview" />
<controls:PageLink
Link="https://www.pedrolamas.com"
Text="Pedro Lamas's work on G-Code and STL" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,115 +2,84 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerRenamePage" x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerRenamePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="PowerRename" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerRename.png">
x:Uid="PowerRename" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerRename.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel <StackPanel
x:Name="PowerRenameView" ChildrenTransitions="{StaticResource SettingsCardsAnimations}" x:Name="PowerRenameView"
ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
Orientation="Vertical"> Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="PowerRename_Toggle_Enable" x:Uid="PowerRename_Toggle_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerRename.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerRename.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="PowerRename_ShellIntegration" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="PowerRename_ShellIntegration" <controls:SettingsExpander x:Uid="PowerRename_Toggle_ContextMenu" IsExpanded="False">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextExtendedMenu, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<labs:SettingsExpander
x:Uid="PowerRename_Toggle_ContextMenu"
IsExpanded="False">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextExtendedMenu, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="PowerRename_Toggle_StandardContextMenu" /> <ComboBoxItem x:Uid="PowerRename_Toggle_StandardContextMenu" />
<ComboBoxItem x:Uid="PowerRename_Toggle_ExtendedContextMenu" /> <ComboBoxItem x:Uid="PowerRename_Toggle_ExtendedContextMenu" />
</ComboBox> </ComboBox>
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Left"> <controls:SettingsCard ContentAlignment="Left">
<CheckBox <CheckBox x:Uid="PowerRename_Toggle_HideIcon" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextMenu, Converter={StaticResource BoolNegationConverter}}" />
x:Uid="PowerRename_Toggle_HideIcon" </controls:SettingsCard>
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextMenu, Converter={StaticResource BoolNegationConverter}}" /> </controls:SettingsExpander.Items>
</labs:SettingsCard> </controls:SettingsExpander>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
<InfoBar <InfoBar
x:Uid="ExtendedContextMenuInfo" x:Uid="ExtendedContextMenuInfo"
IsClosable="False" IsClosable="False"
IsOpen="True" IsOpen="True"
IsTabStop="True" IsTabStop="True"
Severity="Informational" /> Severity="Informational" />
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="PowerRename_AutoCompleteHeader" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="PowerRename_AutoCompleteHeader" <controls:SettingsExpander x:Uid="PowerRename_Toggle_AutoComplete" IsExpanded="True">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MRUEnabled}" />
<labs:SettingsExpander <controls:SettingsExpander.Items>
x:Uid="PowerRename_Toggle_AutoComplete" <controls:SettingsCard x:Uid="PowerRename_Toggle_MaxDispListNum" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.GlobalAndMruEnabled}">
IsExpanded="True">
<ToggleSwitch
x:Uid="ToggleSwitch"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MRUEnabled}" />
<labs:SettingsExpander.Items>
<labs:SettingsCard
x:Uid="PowerRename_Toggle_MaxDispListNum"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.GlobalAndMruEnabled}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="20" Maximum="20"
Minimum="0" Minimum="0"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.MaxDispListNum}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.MaxDispListNum}" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
<labs:SettingsCard <controls:SettingsCard x:Uid="PowerRename_Toggle_RestoreFlagsOnLaunch" HeaderIcon="{ui:FontIcon Glyph=&#xe81c;}">
x:Uid="PowerRename_Toggle_RestoreFlagsOnLaunch" <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreFlagsOnLaunch}" />
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xe81c;}"> </controls:SettingsCard>
<ToggleSwitch </custom:SettingsGroup>
x:Uid="ToggleSwitch" <custom:SettingsGroup x:Uid="PowerRename_BehaviorHeader" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreFlagsOnLaunch}" /> <controls:SettingsCard x:Uid="PowerRename_Toggle_UseBoostLib">
</labs:SettingsCard> <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.UseBoostLib}" />
</controls:SettingsGroup> </controls:SettingsCard>
<controls:SettingsGroup </custom:SettingsGroup>
x:Uid="PowerRename_BehaviorHeader"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard x:Uid="PowerRename_Toggle_UseBoostLib">
<ToggleSwitch
x:Uid="ToggleSwitch"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.UseBoostLib}" />
</labs:SettingsCard>
</controls:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_PowerRename" Link="https://aka.ms/PowerToysOverview_PowerRename" />
x:Uid="LearnMore_PowerRename" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_PowerRename" /> <custom:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl.PrimaryLinks> <custom:PageLink Link="https://github.com/chrdavis/SmartRename" Text="Chris Davis's SmartRenamer" />
<controls:SettingsPageControl.SecondaryLinks> </custom:SettingsPageControl.SecondaryLinks>
<controls:PageLink </custom:SettingsPageControl>
Link="https://github.com/chrdavis/SmartRename"
Text="Chris Davis's SmartRenamer" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,24 +2,24 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.RegistryPreviewPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.RegistryPreviewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl x:Uid="RegistryPreview" ModuleImageSource="ms-appx:///Assets/Settings/Modules/RegistryPreview.png"> <custom:SettingsPageControl x:Uid="RegistryPreview" ModuleImageSource="ms-appx:///Assets/Settings/Modules/RegistryPreview.png">
<controls:SettingsPageControl.ModuleContent> <custom:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<labs:SettingsCard <controls:SettingsCard
x:Uid="RegistryPreview_Enable_RegistryPreview" x:Uid="RegistryPreview_Enable_RegistryPreview"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsRegistryPreview.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsRegistryPreview.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch IsOn="{x:Bind ViewModel.IsRegistryPreviewEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> <ToggleSwitch IsOn="{x:Bind ViewModel.IsRegistryPreviewEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
@ -28,27 +28,25 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup x:Uid="RegistryPreview_Launch_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsRegistryPreviewEnabled}"> <custom:SettingsGroup x:Uid="RegistryPreview_Launch_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsRegistryPreviewEnabled}">
<labs:SettingsCard <controls:SettingsCard
x:Uid="RegistryPreview_LaunchButtonControl" x:Uid="RegistryPreview_LaunchButtonControl"
ActionIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, ActionIcon="{ui:FontIcon FontSize=14,
FontSize=14,
Glyph=&#xE8A7;}" Glyph=&#xE8A7;}"
Command="{x:Bind ViewModel.LaunchEventHandler}" Command="{x:Bind ViewModel.LaunchEventHandler}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xEA37;}"
Glyph=&#xEA37;}"
IsClickEnabled="True" /> IsClickEnabled="True" />
<labs:SettingsCard x:Uid="RegistryPreview_DefaultRegApp" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE7AC;}"> <controls:SettingsCard x:Uid="RegistryPreview_DefaultRegApp" HeaderIcon="{ui:FontIcon Glyph=&#xE7AC;}">
<ToggleSwitch x:Uid="RegistryPreview_DefaultRegApp_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsRegistryPreviewDefaultRegApp}" /> <ToggleSwitch x:Uid="RegistryPreview_DefaultRegApp_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsRegistryPreviewDefaultRegApp}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="LearnMore_RegistryPreview" Link="https://aka.ms/PowerToysOverview_RegistryPreview" /> <custom:PageLink x:Uid="LearnMore_RegistryPreview" Link="https://aka.ms/PowerToysOverview_RegistryPreview" />
</controls:SettingsPageControl.PrimaryLinks> </custom:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl> </custom:SettingsPageControl>
</Page> </Page>

View File

@ -2,13 +2,13 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.ShellPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.ShellPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations" xmlns:animations="using:CommunityToolkit.WinUI.Animations"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers" xmlns:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers"
xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:ic="using:Microsoft.Xaml.Interactions.Core" xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views" xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views"
HighContrastAdjustment="None" HighContrastAdjustment="None"
Loaded="ShellPage_Loaded" Loaded="ShellPage_Loaded"
@ -145,8 +145,8 @@
<NavigationViewItem <NavigationViewItem
x:Uid="Shell_MouseWithoutBorders" x:Uid="Shell_MouseWithoutBorders"
helpers:NavHelper.NavigateTo="views:MouseWithoutBordersPage" helpers:NavHelper.NavigateTo="views:MouseWithoutBordersPage"
Icon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png}" /> Icon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png}" />
<NavigationViewItem <NavigationViewItem
x:Uid="Shell_PastePlain" x:Uid="Shell_PastePlain"
@ -202,13 +202,11 @@
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<NavigationViewItem <NavigationViewItem
x:Uid="OOBE_NavViewItem" x:Uid="OOBE_NavViewItem"
Icon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Icon="{ui:FontIcon Glyph=&#xF133;}"
Glyph=&#xF133;}"
Tapped="OOBEItem_Tapped" /> Tapped="OOBEItem_Tapped" />
<NavigationViewItem <NavigationViewItem
x:Uid="Feedback_NavViewItem" x:Uid="Feedback_NavViewItem"
Icon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Icon="{ui:FontIcon Glyph=&#xED15;}"
Glyph=&#xED15;}"
Tapped="FeedbackItem_Tapped" /> Tapped="FeedbackItem_Tapped" />
</StackPanel> </StackPanel>
</NavigationView.PaneFooter> </NavigationView.PaneFooter>

View File

@ -2,59 +2,47 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.ShortcutGuidePage" x:Class="Microsoft.PowerToys.Settings.UI.Views.ShortcutGuidePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main" AutomationProperties.LandmarkType="Main"
mc:Ignorable="d"> mc:Ignorable="d">
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="ShortcutGuide" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ShortcutGuide.png">
x:Uid="ShortcutGuide" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/ShortcutGuide.png"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsPageControl.ModuleContent> <controls:SettingsCard
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="ShortcutGuide_Enable" x:Uid="ShortcutGuide_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsShortcutGuide.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsShortcutGuide.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}"> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="Shortcut" <controls:SettingsCard x:Uid="ShortcutGuide_ActivationMethod">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<labs:SettingsCard x:Uid="ShortcutGuide_ActivationMethod">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="Radio_ShortcutGuide_ActivationMethod_CustomizedShortcut" /> <ComboBoxItem x:Uid="Radio_ShortcutGuide_ActivationMethod_CustomizedShortcut" />
<ComboBoxItem x:Uid="Radio_ShortcutGuide_ActivationMethod_LongPressWindowsKey" /> <ComboBoxItem x:Uid="Radio_ShortcutGuide_ActivationMethod_LongPressWindowsKey" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="Activation_Shortcut" x:Uid="Activation_Shortcut"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
Glyph=&#xEDA7;}"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource ReverseBoolToVisibilityConverter}}"> Visibility="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.OpenShortcutGuide, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.OpenShortcutGuide, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="ShortcutGuide_PressTimeForGlobalWindowsShortcuts" x:Uid="ShortcutGuide_PressTimeForGlobalWindowsShortcuts"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE916;}"
Glyph=&#xE916;}"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource BoolToVisibilityConverter}}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
@ -63,12 +51,11 @@
SmallChange="50" SmallChange="50"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.PressTime}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.PressTime}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard
x:Uid="ShortcutGuide_PressTimeForTaskbarIconShortcuts" x:Uid="ShortcutGuide_PressTimeForTaskbarIconShortcuts"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xE916;}"
Glyph=&#xE916;}"
Visibility="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior, Converter={StaticResource BoolToVisibilityConverter}}">
<NumberBox <NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
@ -77,7 +64,7 @@
SmallChange="50" SmallChange="50"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.DelayTime}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.DelayTime}" />
</labs:SettingsCard> </controls:SettingsCard>
<InfoBar <InfoBar
x:Uid="ShortcutGuide_PressWinKeyWarning" x:Uid="ShortcutGuide_PressWinKeyWarning"
@ -86,50 +73,36 @@
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.UseLegacyPressWinKeyBehavior}"
IsTabStop="True" IsTabStop="True"
Severity="Warning" /> Severity="Warning" />
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="Appearance_Behavior" <controls:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=&#xE790;}">
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"> <controls:SettingsCard.Description>
<labs:SettingsCard <HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
x:Uid="ColorModeHeader" </controls:SettingsCard.Description>
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}">
Glyph=&#xE790;}">
<labs:SettingsCard.Description>
<HyperlinkButton
x:Uid="Windows_Color_Settings"
Click="OpenColorsSettings_Click" />
</labs:SettingsCard.Description>
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}">
<ComboBoxItem x:Uid="Radio_Theme_Dark" /> <ComboBoxItem x:Uid="Radio_Theme_Dark" />
<ComboBoxItem x:Uid="Radio_Theme_Light" /> <ComboBoxItem x:Uid="Radio_Theme_Light" />
<ComboBoxItem x:Uid="Radio_Theme_Default" /> <ComboBoxItem x:Uid="Radio_Theme_Default" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="ShortcutGuide_OverlayOpacity"> <controls:SettingsCard x:Uid="ShortcutGuide_OverlayOpacity">
<Slider <Slider
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.OverlayOpacity}" /> Value="{x:Bind Mode=TwoWay, Path=ViewModel.OverlayOpacity}" />
</labs:SettingsCard> </controls:SettingsCard>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="ExcludedApps" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
x:Uid="ExcludedApps" <controls:SettingsExpander
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsExpander
x:Uid="ShortcutGuide_DisabledApps" x:Uid="ShortcutGuide_DisabledApps"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"
Glyph=&#xECE4;}"
IsExpanded="True"> IsExpanded="True">
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard <controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
HorizontalContentAlignment="Stretch"
ContentAlignment="Vertical">
<TextBox <TextBox
x:Uid="ShortcutGuide_DisabledApps_TextBoxControl" x:Uid="ShortcutGuide_DisabledApps_TextBoxControl"
MinWidth="240" MinWidth="240"
@ -140,16 +113,14 @@
ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.DisabledApps, UpdateSourceTrigger=PropertyChanged}" Text="{x:Bind Mode=TwoWay, Path=ViewModel.DisabledApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_ShortcutGuide" Link="https://aka.ms/PowerToysOverview_ShortcutGuide" />
x:Uid="LearnMore_ShortcutGuide" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_ShortcutGuide" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -2,12 +2,12 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.VideoConferencePage" x:Class="Microsoft.PowerToys.Settings.UI.Views.VideoConferencePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI" xmlns:ui="using:CommunityToolkit.WinUI"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
@ -21,12 +21,10 @@
NotEmptyValue="True" /> NotEmptyValue="True" />
</Page.Resources> </Page.Resources>
<controls:SettingsPageControl <custom:SettingsPageControl x:Uid="VideoConference" ModuleImageSource="ms-appx:///Assets/Settings/Modules/VideoConference.png">
x:Uid="VideoConference" <custom:SettingsPageControl.ModuleContent>
ModuleImageSource="ms-appx:///Assets/Settings/Modules/VideoConference.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<InfoBar <InfoBar
x:Uid="VideoConference_DeprecationWarning" x:Uid="VideoConference_DeprecationWarning"
IsClosable="False" IsClosable="False"
@ -42,102 +40,76 @@
</InfoBar.ActionButton> </InfoBar.ActionButton>
</InfoBar> </InfoBar>
<labs:SettingsCard <controls:SettingsCard
x:Uid="VideoConference_Enable" x:Uid="VideoConference_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsVideoConferenceMute.png}" HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsVideoConferenceMute.png}"
IsEnabled="{Binding Mode=OneWay, Path=IsElevated}"> IsEnabled="{Binding Mode=OneWay, Path=IsElevated}">
<ToggleSwitch <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=IsEnabled}" />
x:Uid="ToggleSwitch" </controls:SettingsCard>
IsOn="{Binding Mode=TwoWay, Path=IsEnabled}" />
</labs:SettingsCard>
<InfoBar <InfoBar
x:Uid="VideoConference_RunAsAdminRequired" x:Uid="VideoConference_RunAsAdminRequired"
IsClosable="False" IsClosable="False"
IsOpen="{Binding Mode=OneWay, Path=IsElevated, Converter={StaticResource BoolNegationConverter}}" IsOpen="{Binding Mode=OneWay, Path=IsElevated, Converter={StaticResource BoolNegationConverter}}"
IsTabStop="True" IsTabStop="True"
Severity="Informational"/> Severity="Informational" />
<InfoBar <InfoBar
x:Uid="GPO_IsSettingForced" x:Uid="GPO_IsSettingForced"
IsClosable="False" IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" /> Severity="Informational" />
<controls:SettingsGroup <custom:SettingsGroup x:Uid="VideoConference_Shortcuts" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
x:Uid="VideoConference_Shortcuts" <controls:SettingsCard x:Uid="VideoConference_CameraAndMicrophoneMuteHotkeyControl_Header">
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}"> <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}" />
<labs:SettingsCard x:Uid="VideoConference_CameraAndMicrophoneMuteHotkeyControl_Header"> </controls:SettingsCard>
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_MicrophoneMuteHotkeyControl_Header"> <controls:SettingsCard x:Uid="VideoConference_MicrophoneMuteHotkeyControl_Header">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_MicrophonePushToTalkHotkeyControl_Header"> <controls:SettingsCard x:Uid="VideoConference_MicrophonePushToTalkHotkeyControl_Header">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MicrophonePushToTalkHotkey, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.MicrophonePushToTalkHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_CameraMuteHotkeyControl_Header"> <controls:SettingsCard x:Uid="VideoConference_CameraMuteHotkeyControl_Header">
<controls:ShortcutControl <custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.CameraMuteHotkey, Mode=TwoWay}" />
MinWidth="{StaticResource SettingActionControlMinWidth}" </controls:SettingsCard>
HotkeySettings="{x:Bind Path=ViewModel.CameraMuteHotkey, Mode=TwoWay}" /> </custom:SettingsGroup>
</labs:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="VideoConference_Microphone" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
x:Uid="VideoConference_Microphone" <controls:SettingsCard x:Uid="VideoConference_SelectedMicrophone" HeaderIcon="{ui:FontIcon Glyph=&#xE720;}">
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<labs:SettingsCard
x:Uid="VideoConference_SelectedMicrophone"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE720;}">
<ComboBox <ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
ItemsSource="{Binding MicrophoneNames, Mode=OneTime}" ItemsSource="{Binding MicrophoneNames, Mode=OneTime}"
SelectedIndex="{Binding Path=SelectedMicrophoneIndex, Mode=TwoWay}" /> SelectedIndex="{Binding Path=SelectedMicrophoneIndex, Mode=TwoWay}" />
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard x:Uid="VideoConference_PushToReverse">
x:Uid="VideoConference_PushToReverse"> <ToggleSwitch x:Uid="PushToReverseSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PushToReverseEnabled}" />
<ToggleSwitch </controls:SettingsCard>
x:Uid="PushToReverseSwitch" </custom:SettingsGroup>
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PushToReverseEnabled}" />
</labs:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="VideoConference_Camera" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
x:Uid="VideoConference_Camera" <controls:SettingsExpander
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<labs:SettingsExpander
x:Uid="VideoConference_SelectedCamera" x:Uid="VideoConference_SelectedCamera"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE960;}" HeaderIcon="{ui:FontIcon Glyph=&#xE960;}"
IsExpanded="True"> IsExpanded="True">
<ComboBox <ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}" MinWidth="{StaticResource SettingActionControlMinWidth}"
IsEnabled="{Binding Mode=TwoWay, Path=IsEnabled}" IsEnabled="{Binding Mode=TwoWay, Path=IsEnabled}"
ItemsSource="{Binding CameraNames, Mode=OneTime}" ItemsSource="{Binding CameraNames, Mode=OneTime}"
SelectedIndex="{Binding Path=SelectedCameraIndex, Mode=TwoWay}" /> SelectedIndex="{Binding Path=SelectedCameraIndex, Mode=TwoWay}" />
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="VideoConference_CameraOverlayImagePathHeader"> <controls:SettingsCard x:Uid="VideoConference_CameraOverlayImagePathHeader">
<StackPanel <StackPanel Orientation="Horizontal" Spacing="8">
Orientation="Horizontal" <Button x:Uid="VideoConference_CameraOverlayImageBrowse" Command="{Binding Mode=OneWay, Path=SelectOverlayImage}" />
Spacing="8">
<Button
x:Uid="VideoConference_CameraOverlayImageBrowse"
Command="{Binding Mode=OneWay, Path=SelectOverlayImage}" />
<Button <Button
x:Uid="VideoConference_CameraOverlayImageClear" x:Uid="VideoConference_CameraOverlayImageClear"
Command="{Binding Mode=OneWay, Path=ClearOverlayImage}" Command="{Binding Mode=OneWay, Path=ClearOverlayImage}"
IsEnabled="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToBoolConverter}}" /> IsEnabled="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToBoolConverter}}" />
</StackPanel> </StackPanel>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard <controls:SettingsCard Visibility="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToCollapsedConverter}}">
Visibility="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToCollapsedConverter}}">
<Border <Border
MaxHeight="100" MaxHeight="100"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -147,20 +119,14 @@
Source="{Binding Mode=OneWay, Path=CameraImageOverlayPath}" Source="{Binding Mode=OneWay, Path=CameraImageOverlayPath}"
ToolTipService.ToolTip="{Binding Mode=OneWay, Path=CameraImageOverlayPath}" /> ToolTipService.ToolTip="{Binding Mode=OneWay, Path=CameraImageOverlayPath}" />
</Border> </Border>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
<controls:SettingsGroup <custom:SettingsGroup x:Uid="VideoConference_Toolbar" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
x:Uid="VideoConference_Toolbar" <controls:SettingsExpander x:Uid="VideoConference_ToolbarPosition" IsExpanded="True">
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}"> <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarPositionIndex}">
<labs:SettingsExpander
x:Uid="VideoConference_ToolbarPosition"
IsExpanded="True">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarPositionIndex}">
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopLeftCorner" /> <ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopLeftCorner" />
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopCenter" /> <ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopCenter" />
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopRightCorner" /> <ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopRightCorner" />
@ -168,34 +134,28 @@
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomCenter" /> <ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomCenter" />
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomRightCorner" /> <ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomRightCorner" />
</ComboBox> </ComboBox>
<labs:SettingsExpander.Items> <controls:SettingsExpander.Items>
<labs:SettingsCard x:Uid="VideoConference_ToolbarMonitor"> <controls:SettingsCard x:Uid="VideoConference_ToolbarMonitor">
<ComboBox <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarMonitorIndex}">
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarMonitorIndex}">
<ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_Main" /> <ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_Main" />
<ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_All" /> <ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_All" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_ToolbarHide"> <controls:SettingsCard x:Uid="VideoConference_ToolbarHide">
<ComboBox <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarHideIndex}">
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarHideIndex}">
<ComboBoxItem x:Uid="VideoConference_ToolbarHideNever" /> <ComboBoxItem x:Uid="VideoConference_ToolbarHideNever" />
<ComboBoxItem x:Uid="VideoConference_ToolbarHideUnmuted" /> <ComboBoxItem x:Uid="VideoConference_ToolbarHideUnmuted" />
<ComboBoxItem x:Uid="VideoConference_ToolbarHideMuted" /> <ComboBoxItem x:Uid="VideoConference_ToolbarHideMuted" />
</ComboBox> </ComboBox>
</labs:SettingsCard> </controls:SettingsCard>
</labs:SettingsExpander.Items> </controls:SettingsExpander.Items>
</labs:SettingsExpander> </controls:SettingsExpander>
</controls:SettingsGroup> </custom:SettingsGroup>
</StackPanel> </StackPanel>
</controls:SettingsPageControl.ModuleContent> </custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks> <custom:SettingsPageControl.PrimaryLinks>
<controls:PageLink <custom:PageLink x:Uid="LearnMore_VCM" Link="https://aka.ms/PowerToysOverview_VideoConference" />
x:Uid="LearnMore_VCM" </custom:SettingsPageControl.PrimaryLinks>
Link="https://aka.ms/PowerToysOverview_VideoConference" /> </custom:SettingsPageControl>
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
</Page> </Page>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.props')" /> <Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
@ -15,15 +15,9 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<OutDir>$(SolutionDir)..\..\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>PowerToys.$(ProjectName)</TargetName> <TargetName>PowerToys.$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)..\..\$(Platform)\$(Configuration)\Tools\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>PowerToys.$(ProjectName)</TargetName>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
@ -45,7 +39,7 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\deps\cziplib\src\zip.c"> <ClCompile Include="..\..\..\deps\cziplib\src\zip.c">
<!-- Disabling warnings for external code --> <!-- Disabling warnings for external code -->
<DisableSpecificWarnings>4706;26451;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>4706;26451;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<ClCompile Include="EventViewer.cpp" /> <ClCompile Include="EventViewer.cpp" />
<ClCompile Include="InstallationFolder.cpp" /> <ClCompile Include="InstallationFolder.cpp" />