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
TEXTINCLUDE
tgz
themeresources
THH
THICKFRAME
THISCOMPONENT

View File

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

View File

@ -4,11 +4,16 @@
</PropertyGroup>
<ItemGroup>
<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.WinUI.UI" Version="7.1.2" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Animations" Version="7.1.2" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.0.230907" />
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.0.230907" />
<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="coverlet.collector" Version="1.3.0" />
<PackageVersion Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
@ -33,7 +38,7 @@
<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. -->
<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.WindowsAppSDK" Version="1.4.230822000" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />

View File

@ -281,11 +281,16 @@ SOFTWARE.
## NuGet Packages used by PowerToys
- CommunityToolkit.Labs.WinUI.SettingsControls 0.0.18
- CommunityToolkit.Mvvm 8.2.0
- CommunityToolkit.WinUI.UI 7.1.2
- CommunityToolkit.WinUI.UI.Animations 7.1.2
- CommunityToolkit.WinUI.UI.Controls 7.1.2
- CommunityToolkit.WinUI.Animations 8.0.230907
- CommunityToolkit.WinUI.Collections 8.0.230907
- 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
- HelixToolkit 2.20.2
- HelixToolkit.Core.Wpf 2.20.2
@ -306,7 +311,7 @@ SOFTWARE.
- Microsoft.Windows.Compatibility 7.0.3
- Microsoft.Windows.CsWin32 0.2.46-beta
- 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.WindowsAppSDK 1.4.230822000
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9

View File

@ -10,7 +10,7 @@
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="BugReportTool_exe" Value="" KeyPath="yes"/>
</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 Id="WebcamReportTool_exe" Win64="yes" Guid="41D5209F-7A9A-4DF2-A22A-9F0A9CF5AA63">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">

View File

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

View File

@ -71,9 +71,10 @@
<ItemGroup>
<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.WinUI.UI" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />

View File

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

View File

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

View File

@ -6,9 +6,11 @@ using System;
using System.Threading.Tasks;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Hosts.Helpers;
using Hosts.Models;
using Hosts.Settings;
using Hosts.ViewModels;
using ManagedCommon;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
@ -186,5 +188,19 @@ namespace Hosts.Views
var entry = (e.OriginalSource as FrameworkElement).DataContext as 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.Input;
using CommunityToolkit.WinUI;
using CommunityToolkit.WinUI.UI;
using CommunityToolkit.WinUI.Collections;
using Hosts.Helpers;
using Hosts.Models;
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)
{
Guid shellItem2Guid = new Guid(IShellItem2Guid);
int retCode = NativeMethods.SHCreateItemFromParsingName(fileName, IntPtr.Zero, ref shellItem2Guid, out IShellItem nativeShellItem);
IntPtr hBitmap = IntPtr.Zero;
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
{
Width = width,
Height = height,
};
if (retCode != 0)
{
Log.Error($"Error while creating item. retCode:{retCode} ", MethodBase.GetCurrentMethod().DeclaringType);
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 (options == ThumbnailOptions.ThumbnailOnly && hr == HResult.ExtractionFailed)
{
hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, ThumbnailOptions.IconOnly, out hBitmap);
}
if (options == ThumbnailOptions.ThumbnailOnly && hr == HResult.ExtractionFailed)
{
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;
}
throw new InvalidComObjectException($"Error while extracting thumbnail for {fileName}", Marshal.GetExceptionForHR((int)hr));
catch (System.Exception ex)
{
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.

View File

@ -62,7 +62,9 @@
<ItemGroup>
<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.WindowsAppSDK" />
<PackageReference Include="WinUIEx" />

View File

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

View File

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

View File

@ -26,6 +26,7 @@
#include <common/updating/updateState.h>
#include <common/themes/windows_colors.h>
#include "settings_window.h"
#include "bug_report.h"
#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")
{
bool expected_isUpdateCheckThreadRunning = false;
if (isUpdateCheckThreadRunning.compare_exchange_strong(expected_isUpdateCheckThreadRunning,true))
if (isUpdateCheckThreadRunning.compare_exchange_strong(expected_isUpdateCheckThreadRunning, true))
{
std::thread([]() {
CheckForUpdatesCallback();
@ -222,19 +223,7 @@ void dispatch_received_json(const std::wstring& json_to_parse)
}
else if (name == L"bugreport")
{
std::wstring bug_report_path = get_module_folderpath();
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);
}
launch_bug_report();
}
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());
std::wstring executable_args = fmt::format(L"\"{}\" {} {} {} {} {} {} {} {} {} {} {}",
executable_path,
powertoys_pipe_name,
settings_pipe_name,
std::to_wstring(powertoys_pid),
settings_theme,
settings_elevatedStatus,
settings_isUserAnAdmin,
settings_showOobe,
settings_showScoobe,
settings_showFlyout,
settings_containsSettingsWindow,
settings_containsFlyoutPosition);
executable_path,
powertoys_pipe_name,
settings_pipe_name,
std::to_wstring(powertoys_pid),
settings_theme,
settings_elevatedStatus,
settings_isUserAnAdmin,
settings_showOobe,
settings_showScoobe,
settings_showFlyout,
settings_containsSettingsWindow,
settings_containsFlyoutPosition);
if (settings_window.has_value())
{

View File

@ -6,17 +6,18 @@
#include "centralized_kb_hook.h"
#include <Windows.h>
#include <common/utils/process_path.h>
#include <common/utils/resources.h>
#include <common/version/version.h>
#include <common/logger/logger.h>
#include <common/utils/elevation.h>
#include "bug_report.h"
namespace
{
HWND tray_icon_hwnd = NULL;
enum {
enum
{
wm_icon_notify = WM_APP,
wm_run_on_main_ui_thread,
};
@ -44,8 +45,6 @@ struct run_on_main_ui_thread_msg
PVOID data;
};
std::atomic_bool isBugReportThreadRunning = false;
bool dispatch_run_on_main_ui_thread(main_loop_callback_function _callback, PVOID data)
{
if (tray_icon_hwnd == NULL)
@ -74,11 +73,11 @@ void handle_tray_command(HWND window, const WPARAM command_id, LPARAM lparam)
switch (command_id)
{
case ID_SETTINGS_MENU_COMMAND:
{
std::wstring settings_window{ winrt::to_hstring(ESettingsWindowNames_to_string(static_cast<ESettingsWindowNames>(lparam))) };
open_settings_window(settings_window, false);
}
break;
{
std::wstring settings_window{ winrt::to_hstring(ESettingsWindowNames_to_string(static_cast<ESettingsWindowNames>(lparam))) };
open_settings_window(settings_window, false);
}
break;
case ID_EXIT_MENU_COMMAND:
if (h_menu)
{
@ -97,29 +96,7 @@ void handle_tray_command(HWND window, const WPARAM command_id, LPARAM lparam)
break;
case ID_REPORT_BUG_COMMAND:
{
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();
}
launch_bug_report();
break;
}
@ -230,7 +207,7 @@ LRESULT __stdcall tray_icon_window_proc(HWND window, UINT message, WPARAM wparam
// start timer for detecting single or double click
double_click_timer_running = true;
double_clicked = false;
UINT doubleClickTime = GetDoubleClickTime();
std::thread([doubleClickTime]() {
std::this_thread::sleep_for(std::chrono::milliseconds(doubleClickTime));

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>
<PackageReference Include="CommunityToolkit.Labs.WinUI.SettingsControls" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Animations" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" />
<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="CommunityToolkit.WinUI.UI" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" />
<PackageReference Include="WinUIEx" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,7 @@ using Microsoft.PowerToys.Telemetry;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation;
using WinUIEx;
namespace Microsoft.PowerToys.Settings.UI.Flyout
{
@ -141,6 +142,9 @@ namespace Microsoft.PowerToys.Settings.UI.Flyout
private void ReportBugBtn_Click(object sender, RoutedEventArgs e)
{
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"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d">
<controls:OOBEPageControl
<custom:OOBEPageControl
x:Uid="Oobe_AlwaysOnTop"
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/AlwaysOnTop.png">
<controls:OOBEPageControl.PageContent>
<custom:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical">
<TextBlock
x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" />
<controls:ShortcutWithTextLabelControl
<custom:ShortcutWithTextLabelControl
x:Name="HotkeyControl"
x:Uid="Oobe_AlwaysOnTop_HowToUse" />
@ -46,6 +46,6 @@
</HyperlinkButton>
</StackPanel>
</StackPanel>
</controls:OOBEPageControl.PageContent>
</controls:OOBEPageControl>
</custom:OOBEPageControl.PageContent>
</custom:OOBEPageControl>
</Page>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,12 +2,12 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.GeneralPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI"
xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
@ -16,12 +16,12 @@
<localConverters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" />
</Page.Resources>
<controls:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
<controls:SettingsPageControl.ModuleContent>
<custom:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
<custom:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0">
<labs:SettingsCard Header="{Binding PowerToysVersion}" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE895;}">
<labs:SettingsCard.Description>
<custom:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0">
<controls:SettingsCard Header="{Binding PowerToysVersion}" HeaderIcon="{ui:FontIcon Glyph=&#xE895;}">
<controls:SettingsCard.Description>
<StackPanel Orientation="Vertical">
<TextBlock Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="General_VersionLastChecked" />
@ -33,7 +33,7 @@
FontWeight="SemiBold"
NavigateUri="https://github.com/microsoft/PowerToys/releases/" />
</StackPanel>
</labs:SettingsCard.Description>
</controls:SettingsCard.Description>
<Grid Visibility="{Binding IsUpdatePanelVisible, Mode=OneWay}">
<StackPanel
VerticalAlignment="Center"
@ -55,7 +55,7 @@
IsEnabled="{Binding IsDownloadAllowed}"
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
</Grid>
</labs:SettingsCard>
</controls:SettingsCard>
<InfoBar
x:Uid="General_UpToDate"
IsClosable="False"
@ -175,68 +175,67 @@
</InfoBar.ActionButton>
</InfoBar>
<labs:SettingsCard
<controls:SettingsCard
x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
Margin="0,-6,0,0"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAutoDownloadUpdatesCardEnabled}"
Visibility="{Binding Mode=OneWay, Path=IsAdmin, Converter={StaticResource BoolToVisibilityConverter}}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" />
</labs:SettingsCard>
</controls:SettingsCard>
<InfoBar
x:Uid="GPO_AutoDownloadUpdatesIsDisabled"
IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.ShowAutoDownloadUpdatesGpoInformation}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ShowAutoDownloadUpdatesGpoInformation}"
Severity="Informational" />
</controls:SettingsGroup>
</custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Admin_Mode">
<labs:SettingsExpander
<custom:SettingsGroup x:Uid="Admin_Mode">
<controls:SettingsExpander
x:Uid="Admin_Mode_Running_As"
Header="{Binding Mode=OneWay, Path=RunningAsText}"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xE7EF;}"
HeaderIcon="{ui:FontIcon Glyph=&#xE7EF;}"
IsExpanded="True">
<labs:SettingsExpander.Description>
<controls:SettingsExpander.Description>
<HyperlinkButton x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" />
</labs:SettingsExpander.Description>
</controls:SettingsExpander.Description>
<Button
x:Uid="GeneralPage_RestartAsAdmin_Button"
Command="{Binding RestartElevatedButtonEventHandler}"
IsEnabled="{Binding Mode=OneWay, Path=IsAdminButtonEnabled}" />
<labs:SettingsExpander.Items>
<labs:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=OneWay, Path=IsElevated}">
<controls:SettingsExpander.Items>
<controls:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=OneWay, Path=IsElevated}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=RunElevated}" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
<controls:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">
<labs:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE790;}">
<labs:SettingsCard.Description>
<custom:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">
<controls:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=&#xE790;}">
<controls:SettingsCard.Description>
<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}">
<ComboBoxItem x:Uid="Radio_Theme_Dark" />
<ComboBoxItem x:Uid="Radio_Theme_Light" />
<ComboBoxItem x:Uid="Radio_Theme_Default" />
</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}" />
</labs:SettingsCard>
</controls:SettingsGroup>
</controls:SettingsCard>
</custom:SettingsGroup>
<controls:SettingsGroup x:Uid="General_SettingsBackupAndRestoreTitle" Visibility="Visible">
<labs:SettingsExpander x:Uid="General_SettingsBackupAndRestore" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE777;}">
<custom:SettingsGroup x:Uid="General_SettingsBackupAndRestoreTitle" Visibility="Visible">
<controls:SettingsExpander x:Uid="General_SettingsBackupAndRestore" HeaderIcon="{ui:FontIcon Glyph=&#xE777;}">
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Uid="General_SettingsBackupAndRestore_ButtonBackup" Command="{Binding BackupConfigsEventHandler}" />
<Button x:Uid="General_SettingsBackupAndRestore_ButtonRestore" Command="{Binding RestoreConfigsEventHandler}" />
</StackPanel>
<labs:SettingsExpander.Items>
<labs:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
<controls:SettingsExpander.Items>
<controls:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
<StackPanel
HorizontalAlignment="Right"
Orientation="Horizontal"
@ -244,10 +243,10 @@
<TextBlock
x:Name="pathTextBlock"
VerticalAlignment="Center"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}"
TextTrimming="CharacterEllipsis"
Foreground="{ThemeResource TextFillColorSecondaryBrush}">
TextTrimming="CharacterEllipsis">
<ToolTipService.ToolTip>
<ToolTip IsEnabled="{Binding ElementName=pathTextBlock, Path=IsTextTrimmed}">
<TextBlock Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}" />
@ -265,14 +264,14 @@
</ToolTipService.ToolTip>
</Button>
</StackPanel>
</labs:SettingsCard>
<labs:SettingsCard
</controls:SettingsCard>
<controls:SettingsCard
x:Uid="General_SettingsBackupAndRestoreStatusInfo"
HorizontalContentAlignment="Left"
ContentAlignment="Vertical">
<Grid Margin="0,0,0,6" ColumnSpacing="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="{StaticResource SettingActionControlMinWidth}"/>
<ColumnDefinition Width="Auto" MinWidth="{StaticResource SettingActionControlMinWidth}" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@ -309,10 +308,10 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding LastSettingsBackupDate, Mode=OneWay}" />
</Grid>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
<InfoBar
x:Uid="General_SettingsBackupMessageResults"
Title="{Binding SettingsBackupMessage}"
@ -320,32 +319,32 @@
IsOpen="{Binding SettingsBackupRestoreMessageVisible, Mode=OneWay}"
IsTabStop="{Binding SettingsBackupRestoreMessageVisible, Mode=OneWay}"
Severity="{Binding BackupRestoreMessageSeverity, Converter={StaticResource StringToInfoBarSeverityConverter}}" />
<controls:SettingsGroup x:Uid="General_Experimentation" Visibility="Visible">
<labs:SettingsCard x:Uid="GeneralPage_EnableExperimentation" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed, Converter={StaticResource BoolNegationConverter}}">
<labs:SettingsCard.HeaderIcon>
<custom:SettingsGroup x:Uid="General_Experimentation" Visibility="Visible">
<controls:SettingsCard x:Uid="GeneralPage_EnableExperimentation" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed, Converter={StaticResource BoolNegationConverter}}">
<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" />
</labs:SettingsCard.HeaderIcon>
</controls:SettingsCard.HeaderIcon>
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=EnableExperimentation}" />
</labs:SettingsCard>
</controls:SettingsCard>
<InfoBar
x:Uid="GPO_ExperimentationIsDisallowed"
IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsExperimentationGpoDisallowed}"
Severity="Informational" />
</controls:SettingsGroup>
</custom:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks>
<controls:PageLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview" />
<controls:PageLink x:Uid="General_Repository" Link="https://aka.ms/powertoys" />
<controls:PageLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug" />
<controls:PageLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature" />
</controls:SettingsPageControl.PrimaryLinks>
<controls:SettingsPageControl.SecondaryLinks>
<controls: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" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
</custom:SettingsPageControl.ModuleContent>
<custom:SettingsPageControl.PrimaryLinks>
<custom:PageLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview" />
<custom:PageLink x:Uid="General_Repository" Link="https://aka.ms/powertoys" />
<custom:PageLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug" />
<custom:PageLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature" />
</custom:SettingsPageControl.PrimaryLinks>
<custom:SettingsPageControl.SecondaryLinks>
<custom:PageLink x:Uid="GeneralPage_PrivacyStatement_URL" Link="http://go.microsoft.com/fwlink/?LinkId=521839" />
<custom:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md" />
</custom:SettingsPageControl.SecondaryLinks>
</custom:SettingsPageControl>
</Page>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,28 +2,26 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerAccentPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
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:ui="using:CommunityToolkit.WinUI.UI"
xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
<controls:SettingsPageControl
<custom:SettingsPageControl
x:Uid="QuickAccent"
IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Settings/Modules/PowerAccent.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
<custom:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsCard
x:Uid="QuickAccent_EnableQuickAccent"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsPowerAccent.png}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch
x:Uid="ToggleSwitch"
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</labs:SettingsCard>
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</controls:SettingsCard>
<InfoBar
x:Uid="GPO_IsSettingForced"
@ -32,36 +30,22 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" />
<controls:SettingsGroup
x:Uid="QuickAccent_Activation_GroupSettings"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<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}">
<custom:SettingsGroup x:Uid="QuickAccent_Activation_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsCard x:Uid="QuickAccent_Activation_Shortcut" HeaderIcon="{ui:FontIcon 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_Space" />
<ComboBoxItem x:Uid="QuickAccent_Activation_Key_Either" />
</ComboBox>
</labs:SettingsCard>
</controls:SettingsGroup>
</controls:SettingsCard>
</custom:SettingsGroup>
<controls:SettingsGroup
x:Uid="QuickAccent_Language"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<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}">
<custom:SettingsGroup x:Uid="QuickAccent_Language" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsCard x:Uid="QuickAccent_SelectedLanguage" HeaderIcon="{ui:FontIcon 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 -->
<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_Croatian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Czech" />
@ -91,19 +75,12 @@
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Turkish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Welsh" />
</ComboBox>
</labs:SettingsCard>
</controls:SettingsGroup>
</controls:SettingsCard>
</custom:SettingsGroup>
<controls:SettingsGroup
x:Uid="QuickAccent_Toolbar"
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<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}">
<custom:SettingsGroup x:Uid="QuickAccent_Toolbar" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<controls:SettingsCard x:Uid="QuickAccent_ToolbarPosition" HeaderIcon="{ui:FontIcon 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_BottomCenter" />
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_Left" />
@ -114,25 +91,20 @@
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_BottomLeftCorner" />
<ComboBoxItem x:Uid="QuickAccent_ToolbarPosition_Center" />
</ComboBox>
</labs:SettingsCard>
<labs:SettingsCard x:Uid="QuickAccent_Description_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE946;}">
</controls:SettingsCard>
<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}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="QuickAccent_SortByUsageFrequency_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE8CB;}">
</controls:SettingsCard>
<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}" />
</labs:SettingsCard>
<labs:SettingsCard x:Uid="QuickAccent_StartSelectionFromTheLeft_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE974;}">
</controls:SettingsCard>
<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}" />
</labs:SettingsCard>
</controls:SettingsGroup>
</controls:SettingsCard>
</custom:SettingsGroup>
<controls:SettingsGroup
x:Uid="QuickAccent_Behavior"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<labs:SettingsCard
x:Uid="QuickAccent_InputTimeMs"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xE916;}">
<custom:SettingsGroup x:Uid="QuickAccent_Behavior" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsCard x:Uid="QuickAccent_InputTimeMs" HeaderIcon="{ui:FontIcon Glyph=&#xE916;}">
<NumberBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
LargeChange="100"
@ -140,16 +112,11 @@
SmallChange="10"
SpinButtonPlacementMode="Compact"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.InputTimeMs}" />
</labs:SettingsCard>
</controls:SettingsCard>
<labs:SettingsExpander
x:Uid="QuickAccent_ExcludedApps"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Glyph=&#xECE4;}">
<labs:SettingsExpander.Items>
<labs:SettingsCard
HorizontalContentAlignment="Stretch"
ContentAlignment="Vertical">
<controls:SettingsExpander x:Uid="QuickAccent_ExcludedApps" HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}">
<controls:SettingsExpander.Items>
<controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
<TextBox
x:Uid="QuickAccent_ExcludedApps_TextBoxControl"
MinWidth="240"
@ -160,22 +127,18 @@
ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>
</custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks>
<controls:PageLink
x:Uid="LearnMore_QuickAccent"
Link="https://aka.ms/PowerToysOverview_QuickAccent" />
</controls:SettingsPageControl.PrimaryLinks>
<controls:SettingsPageControl.SecondaryLinks>
<controls:PageLink
Link="https://github.com/damienleroy/PowerAccent"
Text="Damien Leroy's PowerAccent" />
</controls:SettingsPageControl.SecondaryLinks>
</controls:SettingsPageControl>
<custom:SettingsPageControl.PrimaryLinks>
<custom:PageLink x:Uid="LearnMore_QuickAccent" Link="https://aka.ms/PowerToysOverview_QuickAccent" />
</custom:SettingsPageControl.PrimaryLinks>
<custom:SettingsPageControl.SecondaryLinks>
<custom:PageLink Link="https://github.com/damienleroy/PowerAccent" Text="Damien Leroy's PowerAccent" />
</custom:SettingsPageControl.SecondaryLinks>
</custom:SettingsPageControl>
</Page>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,12 +2,12 @@
x:Class="Microsoft.PowerToys.Settings.UI.Views.VideoConferencePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
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:ui="using:CommunityToolkit.WinUI.UI"
xmlns:ui="using:CommunityToolkit.WinUI"
mc:Ignorable="d">
<Page.Resources>
@ -21,12 +21,10 @@
NotEmptyValue="True" />
</Page.Resources>
<controls:SettingsPageControl
x:Uid="VideoConference"
ModuleImageSource="ms-appx:///Assets/Settings/Modules/VideoConference.png">
<controls:SettingsPageControl.ModuleContent>
<custom:SettingsPageControl x:Uid="VideoConference" ModuleImageSource="ms-appx:///Assets/Settings/Modules/VideoConference.png">
<custom:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<InfoBar
x:Uid="VideoConference_DeprecationWarning"
IsClosable="False"
@ -42,102 +40,76 @@
</InfoBar.ActionButton>
</InfoBar>
<labs:SettingsCard
<controls:SettingsCard
x:Uid="VideoConference_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsVideoConferenceMute.png}"
IsEnabled="{Binding Mode=OneWay, Path=IsElevated}">
<ToggleSwitch
x:Uid="ToggleSwitch"
IsOn="{Binding Mode=TwoWay, Path=IsEnabled}" />
</labs:SettingsCard>
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=IsEnabled}" />
</controls:SettingsCard>
<InfoBar
x:Uid="VideoConference_RunAsAdminRequired"
IsClosable="False"
IsOpen="{Binding Mode=OneWay, Path=IsElevated, Converter={StaticResource BoolNegationConverter}}"
IsTabStop="True"
Severity="Informational"/>
Severity="Informational" />
<InfoBar
x:Uid="GPO_IsSettingForced"
IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" />
<controls:SettingsGroup
x:Uid="VideoConference_Shortcuts"
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<labs:SettingsCard x:Uid="VideoConference_CameraAndMicrophoneMuteHotkeyControl_Header">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<custom:SettingsGroup x:Uid="VideoConference_Shortcuts" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<controls:SettingsCard x:Uid="VideoConference_CameraAndMicrophoneMuteHotkeyControl_Header">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_MicrophoneMuteHotkeyControl_Header">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<controls:SettingsCard x:Uid="VideoConference_MicrophoneMuteHotkeyControl_Header">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_MicrophonePushToTalkHotkeyControl_Header">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.MicrophonePushToTalkHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
<controls:SettingsCard x:Uid="VideoConference_MicrophonePushToTalkHotkeyControl_Header">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.MicrophonePushToTalkHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_CameraMuteHotkeyControl_Header">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
HotkeySettings="{x:Bind Path=ViewModel.CameraMuteHotkey, Mode=TwoWay}" />
</labs:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsCard x:Uid="VideoConference_CameraMuteHotkeyControl_Header">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.CameraMuteHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
</custom:SettingsGroup>
<controls:SettingsGroup
x:Uid="VideoConference_Microphone"
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<labs:SettingsCard
x:Uid="VideoConference_SelectedMicrophone"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE720;}">
<custom:SettingsGroup x:Uid="VideoConference_Microphone" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<controls:SettingsCard x:Uid="VideoConference_SelectedMicrophone" HeaderIcon="{ui:FontIcon Glyph=&#xE720;}">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
ItemsSource="{Binding MicrophoneNames, Mode=OneTime}"
SelectedIndex="{Binding Path=SelectedMicrophoneIndex, Mode=TwoWay}" />
</labs:SettingsCard>
<labs:SettingsCard
x:Uid="VideoConference_PushToReverse">
<ToggleSwitch
x:Uid="PushToReverseSwitch"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PushToReverseEnabled}" />
</labs:SettingsCard>
</controls:SettingsGroup>
</controls:SettingsCard>
<controls:SettingsGroup
x:Uid="VideoConference_Camera"
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<labs:SettingsExpander
<controls:SettingsCard x:Uid="VideoConference_PushToReverse">
<ToggleSwitch x:Uid="PushToReverseSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PushToReverseEnabled}" />
</controls:SettingsCard>
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="VideoConference_Camera" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<controls:SettingsExpander
x:Uid="VideoConference_SelectedCamera"
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=&#xE960;}"
HeaderIcon="{ui:FontIcon Glyph=&#xE960;}"
IsExpanded="True">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
IsEnabled="{Binding Mode=TwoWay, Path=IsEnabled}"
ItemsSource="{Binding CameraNames, Mode=OneTime}"
SelectedIndex="{Binding Path=SelectedCameraIndex, Mode=TwoWay}" />
<labs:SettingsExpander.Items>
<labs:SettingsCard x:Uid="VideoConference_CameraOverlayImagePathHeader">
<StackPanel
Orientation="Horizontal"
Spacing="8">
<Button
x:Uid="VideoConference_CameraOverlayImageBrowse"
Command="{Binding Mode=OneWay, Path=SelectOverlayImage}" />
<controls:SettingsExpander.Items>
<controls:SettingsCard x:Uid="VideoConference_CameraOverlayImagePathHeader">
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Uid="VideoConference_CameraOverlayImageBrowse" Command="{Binding Mode=OneWay, Path=SelectOverlayImage}" />
<Button
x:Uid="VideoConference_CameraOverlayImageClear"
Command="{Binding Mode=OneWay, Path=ClearOverlayImage}"
IsEnabled="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToBoolConverter}}" />
</StackPanel>
</labs:SettingsCard>
<labs:SettingsCard
Visibility="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToCollapsedConverter}}">
</controls:SettingsCard>
<controls:SettingsCard Visibility="{Binding Path=CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToCollapsedConverter}}">
<Border
MaxHeight="100"
HorizontalAlignment="Right"
@ -147,20 +119,14 @@
Source="{Binding Mode=OneWay, Path=CameraImageOverlayPath}"
ToolTipService.ToolTip="{Binding Mode=OneWay, Path=CameraImageOverlayPath}" />
</Border>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
<controls:SettingsGroup
x:Uid="VideoConference_Toolbar"
IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<labs:SettingsExpander
x:Uid="VideoConference_ToolbarPosition"
IsExpanded="True">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarPositionIndex}">
<custom:SettingsGroup x:Uid="VideoConference_Toolbar" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
<controls: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_TopCenter" />
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopRightCorner" />
@ -168,34 +134,28 @@
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomCenter" />
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomRightCorner" />
</ComboBox>
<labs:SettingsExpander.Items>
<labs:SettingsCard x:Uid="VideoConference_ToolbarMonitor">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarMonitorIndex}">
<controls:SettingsExpander.Items>
<controls:SettingsCard x:Uid="VideoConference_ToolbarMonitor">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarMonitorIndex}">
<ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_Main" />
<ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_All" />
</ComboBox>
</labs:SettingsCard>
<labs:SettingsCard x:Uid="VideoConference_ToolbarHide">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarHideIndex}">
</controls:SettingsCard>
<controls:SettingsCard x:Uid="VideoConference_ToolbarHide">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding Mode=TwoWay, Path=ToolbarHideIndex}">
<ComboBoxItem x:Uid="VideoConference_ToolbarHideNever" />
<ComboBoxItem x:Uid="VideoConference_ToolbarHideUnmuted" />
<ComboBoxItem x:Uid="VideoConference_ToolbarHideMuted" />
</ComboBox>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</controls:SettingsGroup>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>
</custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks>
<controls:PageLink
x:Uid="LearnMore_VCM"
Link="https://aka.ms/PowerToysOverview_VideoConference" />
</controls:SettingsPageControl.PrimaryLinks>
</controls:SettingsPageControl>
<custom:SettingsPageControl.PrimaryLinks>
<custom:PageLink x:Uid="LearnMore_VCM" Link="https://aka.ms/PowerToysOverview_VideoConference" />
</custom:SettingsPageControl.PrimaryLinks>
</custom:SettingsPageControl>
</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">
<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">
@ -15,15 +15,9 @@
</PropertyGroup>
<PropertyGroup>
<ConfigurationType>Application</ConfigurationType>
<OutDir>$(SolutionDir)..\..\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>PowerToys.$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)..\..\$(Platform)\$(Configuration)\Tools\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>PowerToys.$(ProjectName)</TargetName>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
@ -45,7 +39,7 @@
<ItemGroup>
<ClCompile Include="..\..\..\deps\cziplib\src\zip.c">
<!-- Disabling warnings for external code -->
<DisableSpecificWarnings>4706;26451;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4706;26451;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="EventViewer.cpp" />
<ClCompile Include="InstallationFolder.cpp" />