mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-07 04:46:56 +01:00
Compare commits
8 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
062dce8002 | ||
|
|
bef6f6c49a | ||
|
|
3ebf0f741a | ||
|
|
e8e1431e15 | ||
|
|
2d35fd8530 | ||
|
|
13d950a40a | ||
|
|
3eb8f96f3e | ||
|
|
11218ea4d8 |
3
.github/actions/spell-check/expect.txt
vendored
3
.github/actions/spell-check/expect.txt
vendored
@@ -49,6 +49,7 @@ ALPHATYPE
|
||||
AModifier
|
||||
amr
|
||||
ANDSCANS
|
||||
animatedvisuals
|
||||
Animnate
|
||||
ANull
|
||||
AOC
|
||||
@@ -1024,8 +1025,6 @@ MYICON
|
||||
NAMECHANGE
|
||||
namespaceanddescendants
|
||||
nao
|
||||
Navigatable
|
||||
NavigatablePage
|
||||
NCACTIVATE
|
||||
ncc
|
||||
NCCALCSIZE
|
||||
|
||||
4
.github/actions/spell-check/patterns.txt
vendored
4
.github/actions/spell-check/patterns.txt
vendored
@@ -260,3 +260,7 @@ Process Process
|
||||
# ZoomIt menu items with accelerator keys
|
||||
E&xit
|
||||
St&yle
|
||||
|
||||
# This matches a relative clause where the relative pronoun "that" is omitted.
|
||||
# Example: "Gets or sets the window the TitleBar should configure."
|
||||
\bthe\s+\w+\s+the\b
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" Version="0.1.250703-build.2173" />
|
||||
<PackageVersion Include="CommunityToolkit.Labs.WinUI.TitleBar" Version="0.0.1-build.2206" />
|
||||
<PackageVersion Include="ControlzEx" Version="6.0.0" />
|
||||
<PackageVersion Include="HelixToolkit" Version="2.24.0" />
|
||||
<PackageVersion Include="HelixToolkit.Core.Wpf" Version="2.24.0" />
|
||||
|
||||
@@ -1499,7 +1499,6 @@ SOFTWARE.
|
||||
- CoenM.ImageSharp.ImageHash
|
||||
- CommunityToolkit.Common
|
||||
- CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock
|
||||
- CommunityToolkit.Labs.WinUI.TitleBar
|
||||
- CommunityToolkit.Mvvm
|
||||
- CommunityToolkit.WinUI.Animations
|
||||
- CommunityToolkit.WinUI.Collections
|
||||
|
||||
@@ -32,17 +32,8 @@ namespace ManagedCommon
|
||||
/// <param name="isLocalLow">If the process using Logger is a low-privilege process.</param>
|
||||
public static void InitializeLogger(string applicationLogPath, bool isLocalLow = false)
|
||||
{
|
||||
string basePath;
|
||||
if (isLocalLow)
|
||||
{
|
||||
basePath = Environment.GetEnvironmentVariable("userprofile") + "\\appdata\\LocalLow\\Microsoft\\PowerToys" + applicationLogPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
basePath = Constants.AppDataPath() + applicationLogPath;
|
||||
}
|
||||
|
||||
string versionedPath = Path.Combine(basePath, Version);
|
||||
string versionedPath = LogDirectoryPath(applicationLogPath, isLocalLow);
|
||||
string basePath = Path.GetDirectoryName(versionedPath);
|
||||
|
||||
if (!Directory.Exists(versionedPath))
|
||||
{
|
||||
@@ -59,6 +50,22 @@ namespace ManagedCommon
|
||||
Task.Run(() => DeleteOldVersionLogFolders(basePath, versionedPath));
|
||||
}
|
||||
|
||||
public static string LogDirectoryPath(string applicationLogPath, bool isLocalLow = false)
|
||||
{
|
||||
string basePath;
|
||||
if (isLocalLow)
|
||||
{
|
||||
basePath = Environment.GetEnvironmentVariable("userprofile") + "\\appdata\\LocalLow\\Microsoft\\PowerToys" + applicationLogPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
basePath = Constants.AppDataPath() + applicationLogPath;
|
||||
}
|
||||
|
||||
string versionedPath = Path.Combine(basePath, Version);
|
||||
return versionedPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes old version log folders, keeping only the current version's folder.
|
||||
/// </summary>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using ManagedCommon;
|
||||
using Microsoft.CmdPal.UI.ViewModels.Commands;
|
||||
using Microsoft.CmdPal.UI.ViewModels.Properties;
|
||||
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||
@@ -19,6 +20,10 @@ internal sealed partial class FallbackLogItem : FallbackCommandItem
|
||||
Title = string.Empty;
|
||||
_logMessagesPage.Name = string.Empty;
|
||||
Subtitle = Properties.Resources.builtin_log_subtitle;
|
||||
|
||||
var logPath = Logger.LogDirectoryPath("\\CmdPal\\Logs\\");
|
||||
var openLogCommand = new OpenFileCommand(logPath) { Name = Resources.builtin_log_folder_command_name };
|
||||
MoreCommands = [new CommandContextItem(openLogCommand)];
|
||||
}
|
||||
|
||||
public override void UpdateQuery(string query)
|
||||
|
||||
@@ -126,6 +126,10 @@ public class ExtensionWrapper : IExtensionWrapper
|
||||
// We'll just return out nothing.
|
||||
return;
|
||||
}
|
||||
else if (hr.Value != 0)
|
||||
{
|
||||
Logger.LogError($"Failed to find {ExtensionDisplayName}: {hr.Value}");
|
||||
}
|
||||
|
||||
// Marshal.ThrowExceptionForHR(hr);
|
||||
_extensionObject = MarshalInterface<IExtension>.FromAbi((nint)extensionPtr);
|
||||
|
||||
@@ -285,6 +285,15 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to View log folder.
|
||||
/// </summary>
|
||||
public static string builtin_log_folder_command_name {
|
||||
get {
|
||||
return ResourceManager.GetString("builtin_log_folder_command_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to View log.
|
||||
/// </summary>
|
||||
|
||||
@@ -135,6 +135,9 @@
|
||||
<data name="builtin_log_title" xml:space="preserve">
|
||||
<value>View log</value>
|
||||
</data>
|
||||
<data name="builtin_log_folder_command_name" xml:space="preserve">
|
||||
<value>View log folder</value>
|
||||
</data>
|
||||
<data name="builtin_reload_subtitle" xml:space="preserve">
|
||||
<value>Reload Command Palette extensions</value>
|
||||
</data>
|
||||
|
||||
@@ -438,7 +438,7 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
|
||||
<data name="NavigationPaneClosed" xml:space="preserve">
|
||||
<value>Navigation pane closed</value>
|
||||
</data>
|
||||
<data name="NavigationPageOpened" xml:space="preserve">
|
||||
<data name="NavigationPaneOpened" xml:space="preserve">
|
||||
<value>Navigation page opened</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -79,16 +79,22 @@ public sealed partial class TimeDateCalculator
|
||||
}
|
||||
else
|
||||
{
|
||||
List<(int Score, AvailableResult Item)> itemScores = [];
|
||||
|
||||
// Generate filtered list of results
|
||||
foreach (var f in availableFormats)
|
||||
{
|
||||
var score = f.Score(query, f.Label, f.AlternativeSearchTag);
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
results.Add(f.ToListItem());
|
||||
itemScores.Add((score, f));
|
||||
}
|
||||
}
|
||||
|
||||
results = itemScores
|
||||
.OrderByDescending(s => s.Score)
|
||||
.Select(s => s.Item.ToListItem())
|
||||
.ToList();
|
||||
}
|
||||
|
||||
if (results.Count == 0)
|
||||
|
||||
@@ -316,6 +316,7 @@ void start_enabled_powertoys()
|
||||
should_powertoy_be_enabled = false;
|
||||
}
|
||||
|
||||
bool module_currently_enabled = powertoy->is_enabled();
|
||||
if (should_powertoy_be_enabled)
|
||||
{
|
||||
Logger::info(L"start_enabled_powertoys: Enabling powertoy {}", name);
|
||||
@@ -324,5 +325,13 @@ void start_enabled_powertoys()
|
||||
hkmng.EnableHotkeyByModule(name);
|
||||
powertoy.UpdateHotkeyEx();
|
||||
}
|
||||
else if (module_currently_enabled)
|
||||
{
|
||||
Logger::info(L"start_enabled_powertoys: Disabling powertoy {}", name);
|
||||
powertoy->disable();
|
||||
auto& hkmng = HotkeyConflictDetector::HotkeyConflictManager::GetInstance();
|
||||
hkmng.DisableHotkeyByModule(name);
|
||||
powertoy.UpdateHotkeyEx();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,17 +10,18 @@ using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Hosting;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Windows.UI;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
|
||||
public abstract partial class NavigatablePage : Page
|
||||
public abstract partial class NavigablePage : Page
|
||||
{
|
||||
private const int ExpandWaitDuration = 500;
|
||||
private const int AnimationDuration = 1000;
|
||||
private const int AnimationDuration = 2000;
|
||||
|
||||
private NavigationParams _pendingNavigationParams;
|
||||
|
||||
public NavigatablePage()
|
||||
public NavigablePage()
|
||||
{
|
||||
Loaded += OnPageLoaded;
|
||||
}
|
||||
@@ -85,15 +86,15 @@ public abstract partial class NavigatablePage : Page
|
||||
|
||||
// Create a subtle glow effect using drop shadow
|
||||
var dropShadow = compositor.CreateDropShadow();
|
||||
dropShadow.Color = Microsoft.UI.Colors.Gray;
|
||||
dropShadow.BlurRadius = 8f;
|
||||
dropShadow.Color = (Color)Application.Current.Resources["SystemAccentColorLight2"];
|
||||
dropShadow.BlurRadius = 16f;
|
||||
dropShadow.Opacity = 0f;
|
||||
dropShadow.Offset = new Vector3(0, 0, 0);
|
||||
|
||||
var spriteVisual = compositor.CreateSpriteVisual();
|
||||
spriteVisual.Size = new Vector2((float)target.ActualWidth + 16, (float)target.ActualHeight + 16);
|
||||
spriteVisual.Size = new Vector2((float)target.ActualWidth, (float)target.ActualHeight);
|
||||
spriteVisual.Shadow = dropShadow;
|
||||
spriteVisual.Offset = new Vector3(-8, -8, 0);
|
||||
spriteVisual.Offset = new Vector3(0, 0, 0);
|
||||
|
||||
// Insert the shadow visual behind the target element
|
||||
ElementCompositionPreview.SetElementChildVisual(target, spriteVisual);
|
||||
@@ -106,31 +107,7 @@ public abstract partial class NavigatablePage : Page
|
||||
fadeAnimation.Duration = TimeSpan.FromMilliseconds(AnimationDuration);
|
||||
|
||||
dropShadow.StartAnimation("Opacity", fadeAnimation);
|
||||
|
||||
if (target is Control ctrl)
|
||||
{
|
||||
// TODO: ability to adjust brush color and animation from settings.
|
||||
var originalBackground = ctrl.Background;
|
||||
|
||||
var highlightBrush = new SolidColorBrush();
|
||||
var grayColor = Microsoft.UI.Colors.Gray;
|
||||
grayColor.A = 50; // Very subtle transparency
|
||||
highlightBrush.Color = grayColor;
|
||||
|
||||
// Apply the highlight
|
||||
ctrl.Background = highlightBrush;
|
||||
|
||||
// Wait for animation to complete
|
||||
await Task.Delay(AnimationDuration);
|
||||
|
||||
// Restore original background
|
||||
ctrl.Background = originalBackground;
|
||||
}
|
||||
else
|
||||
{
|
||||
// For non-control elements, just wait for the glow animation
|
||||
await Task.Delay(AnimationDuration);
|
||||
}
|
||||
await Task.Delay(AnimationDuration);
|
||||
|
||||
// Clean up the shadow visual
|
||||
ElementCompositionPreview.SetElementChildVisual(target, null);
|
||||
@@ -25,6 +25,7 @@
|
||||
<None Remove="SettingsXAML\Controls\Dashboard\CheckUpdateControl.xaml" />
|
||||
<None Remove="SettingsXAML\Controls\Dashboard\ShortcutConflictControl.xaml" />
|
||||
<None Remove="SettingsXAML\Controls\KeyVisual\KeyCharPresenter.xaml" />
|
||||
<None Remove="SettingsXAML\Controls\TitleBar\TitleBar.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Remove="SettingsXAML\App.xaml" />
|
||||
@@ -63,7 +64,6 @@
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Extensions" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Markdown" />
|
||||
<PackageReference Include="CommunityToolkit.Labs.WinUI.TitleBar" />
|
||||
<PackageReference Include="System.Net.Http" />
|
||||
<PackageReference Include="System.Private.Uri" />
|
||||
<PackageReference Include="System.Text.RegularExpressions" />
|
||||
@@ -156,7 +156,8 @@
|
||||
</None>
|
||||
<None Update="Assets\Settings\Scripts\DisableModule.ps1">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</None> <Page Update="SettingsXAML\Controls\TitleBar\TitleBar.xaml">
|
||||
</Page>
|
||||
<Page Update="SettingsXAML\Controls\KeyVisual\KeyCharPresenter.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
@@ -185,9 +186,6 @@
|
||||
<!-- Build XamlIndexBuilder before compiling Settings to ensure the search index exists without taking a project reference. -->
|
||||
<Target Name="BuildXamlIndexBeforeSettings" BeforeTargets="CoreCompile">
|
||||
<Message Importance="high" Text="[Settings] Building XamlIndexBuilder prior to compile. Views='$(MSBuildProjectDirectory)\SettingsXAML\Views' Out='$(GeneratedJsonFile)'" />
|
||||
<MSBuild
|
||||
Projects="..\Settings.UI.XamlIndexBuilder\Settings.UI.XamlIndexBuilder.csproj"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);Platform=Any CPU;TargetFramework=net9.0;XamlViewsDir=$(MSBuildProjectDirectory)\SettingsXAML\Views;GeneratedJsonFile=$(GeneratedJsonFile)" />
|
||||
<MSBuild Projects="..\Settings.UI.XamlIndexBuilder\Settings.UI.XamlIndexBuilder.csproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Any CPU;TargetFramework=net9.0;XamlViewsDir=$(MSBuildProjectDirectory)\SettingsXAML\Views;GeneratedJsonFile=$(GeneratedJsonFile)" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -11,6 +11,7 @@
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
<ResourceDictionary Source="/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml" />
|
||||
<ResourceDictionary Source="/SettingsXAML/Controls/KeyVisual/KeyCharPresenter.xaml" />
|
||||
<ResourceDictionary Source="/SettingsXAML/Controls/TitleBar/TitleBar.xaml" />
|
||||
<ResourceDictionary Source="/SettingsXAML/Styles/TextBlock.xaml" />
|
||||
<ResourceDictionary Source="/SettingsXAML/Styles/Button.xaml" />
|
||||
<ResourceDictionary Source="/SettingsXAML/Styles/InfoBadge.xaml" />
|
||||
|
||||
@@ -548,18 +548,14 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
}
|
||||
}
|
||||
|
||||
if (conflictingModules.Count > 0)
|
||||
var moduleNames = conflictingModules.ToArray();
|
||||
if (string.Equals(moduleNames[0], "System", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var moduleNames = conflictingModules.ToArray();
|
||||
var conflictMessage = moduleNames.Length == 1
|
||||
? $"Conflict detected with {moduleNames[0]}"
|
||||
: $"Conflicts detected with: {string.Join(", ", moduleNames)}";
|
||||
|
||||
c.ConflictMessage = conflictMessage;
|
||||
c.ConflictMessage = ResourceLoaderInstance.ResourceLoader.GetString("SysHotkeyConflictTooltipText");
|
||||
}
|
||||
else
|
||||
{
|
||||
c.ConflictMessage = "Conflict detected with unknown module";
|
||||
c.ConflictMessage = ResourceLoaderInstance.ResourceLoader.GetString("InAppHotkeyConflictTooltipText");
|
||||
}
|
||||
|
||||
c.HasConflict = true;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
IsTabStop="{Binding ElementName=ShortcutContentControl, Path=IsWarningAltGr, Mode=OneWay}"
|
||||
Severity="Warning" />
|
||||
<InfoBar
|
||||
Title="Hotkey Conflict"
|
||||
x:Uid="WarningShortcutConflict"
|
||||
IsClosable="False"
|
||||
IsOpen="{Binding ElementName=ShortcutContentControl, Path=HasConflict, Mode=OneWay}"
|
||||
IsTabStop="{Binding ElementName=ShortcutContentControl, Path=HasConflict, Mode=OneWay}"
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
// 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 Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls;
|
||||
|
||||
public partial class TitleBar : Control
|
||||
{
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="Icon"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(nameof(Icon), typeof(IconElement), typeof(TitleBar), new PropertyMetadata(null, IconChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="Title"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(nameof(Title), typeof(string), typeof(TitleBar), new PropertyMetadata(default(string)));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="Subtitle"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty SubtitleProperty = DependencyProperty.Register(nameof(Subtitle), typeof(string), typeof(TitleBar), new PropertyMetadata(default(string)));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="Content"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(object), typeof(TitleBar), new PropertyMetadata(null, ContentChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="Footer"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty FooterProperty = DependencyProperty.Register(nameof(Footer), typeof(object), typeof(TitleBar), new PropertyMetadata(null, FooterChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="IsBackButtonVisible"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsBackButtonVisibleProperty = DependencyProperty.Register(nameof(IsBackButtonVisible), typeof(bool), typeof(TitleBar), new PropertyMetadata(false, IsBackButtonVisibleChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="IsPaneButtonVisible"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsPaneButtonVisibleProperty = DependencyProperty.Register(nameof(IsPaneButtonVisible), typeof(bool), typeof(TitleBar), new PropertyMetadata(false, IsPaneButtonVisibleChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="DisplayMode"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty DisplayModeProperty = DependencyProperty.Register(nameof(DisplayMode), typeof(DisplayMode), typeof(TitleBar), new PropertyMetadata(DisplayMode.Standard, DisplayModeChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="CompactStateBreakpoint
|
||||
/// "/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty CompactStateBreakpointProperty = DependencyProperty.Register(nameof(CompactStateBreakpoint), typeof(int), typeof(TitleBar), new PropertyMetadata(850));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="AutoConfigureCustomTitleBar"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty AutoConfigureCustomTitleBarProperty = DependencyProperty.Register(nameof(AutoConfigureCustomTitleBar), typeof(bool), typeof(TitleBar), new PropertyMetadata(true, AutoConfigureCustomTitleBarChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="DependencyProperty"/> for the <see cref="Window"/> property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty WindowProperty = DependencyProperty.Register(nameof(Window), typeof(Window), typeof(TitleBar), new PropertyMetadata(null));
|
||||
|
||||
/// <summary>
|
||||
/// The event that gets fired when the back button is clicked
|
||||
/// </summary>
|
||||
#pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
public event EventHandler<RoutedEventArgs>? BackButtonClick;
|
||||
#pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
|
||||
/// <summary>
|
||||
/// The event that gets fired when the pane toggle button is clicked
|
||||
/// </summary>
|
||||
#pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
public event EventHandler<RoutedEventArgs>? PaneButtonClick;
|
||||
#pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Icon
|
||||
/// </summary>
|
||||
public IconElement Icon
|
||||
{
|
||||
get => (IconElement)GetValue(IconProperty);
|
||||
set => SetValue(IconProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Title
|
||||
/// </summary>
|
||||
public string Title
|
||||
{
|
||||
get => (string)GetValue(TitleProperty);
|
||||
set => SetValue(TitleProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Subtitle
|
||||
/// </summary>
|
||||
public string Subtitle
|
||||
{
|
||||
get => (string)GetValue(SubtitleProperty);
|
||||
set => SetValue(SubtitleProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content shown at the center of the TitleBar. When setting this, using DisplayMode=Tall is recommended.
|
||||
/// </summary>
|
||||
public object Content
|
||||
{
|
||||
get => (object)GetValue(ContentProperty);
|
||||
set => SetValue(ContentProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content shown at the right of the TitleBar, next to the caption buttons. When setting this, using DisplayMode=Tall is recommended.
|
||||
/// </summary>
|
||||
public object Footer
|
||||
{
|
||||
get => (object)GetValue(FooterProperty);
|
||||
set => SetValue(FooterProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets DisplayMode. Compact is default (32px), Tall is recommended when setting the Content or Footer.
|
||||
/// </summary>
|
||||
public DisplayMode DisplayMode
|
||||
{
|
||||
get => (DisplayMode)GetValue(DisplayModeProperty);
|
||||
set => SetValue(DisplayModeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether gets or sets the visibility of the back button.
|
||||
/// </summary>
|
||||
public bool IsBackButtonVisible
|
||||
{
|
||||
get => (bool)GetValue(IsBackButtonVisibleProperty);
|
||||
set => SetValue(IsBackButtonVisibleProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether gets or sets the visibility of the pane toggle button.
|
||||
/// </summary>
|
||||
public bool IsPaneButtonVisible
|
||||
{
|
||||
get => (bool)GetValue(IsPaneButtonVisibleProperty);
|
||||
set => SetValue(IsPaneButtonVisibleProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the breakpoint of when the compact state is triggered.
|
||||
/// </summary>
|
||||
public int CompactStateBreakpoint
|
||||
{
|
||||
get => (int)GetValue(CompactStateBreakpointProperty);
|
||||
set => SetValue(CompactStateBreakpointProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether gets or sets if the TitleBar should auto configure ExtendContentIntoTitleBar and CaptionButton background colors.
|
||||
/// </summary>
|
||||
public bool AutoConfigureCustomTitleBar
|
||||
{
|
||||
get => (bool)GetValue(AutoConfigureCustomTitleBarProperty);
|
||||
set => SetValue(AutoConfigureCustomTitleBarProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the window the TitleBar should configure.
|
||||
/// </summary>
|
||||
public Window Window
|
||||
{
|
||||
get => (Window)GetValue(WindowProperty);
|
||||
set => SetValue(WindowProperty, value);
|
||||
}
|
||||
|
||||
private static void IsBackButtonVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
((TitleBar)d).Update();
|
||||
}
|
||||
|
||||
private static void IsPaneButtonVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
((TitleBar)d).Update();
|
||||
}
|
||||
|
||||
private static void DisplayModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
((TitleBar)d).Update();
|
||||
}
|
||||
|
||||
private static void ContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
((TitleBar)d).Update();
|
||||
}
|
||||
|
||||
private static void FooterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
((TitleBar)d).Update();
|
||||
}
|
||||
|
||||
private static void IconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
((TitleBar)d).Update();
|
||||
}
|
||||
|
||||
private static void AutoConfigureCustomTitleBarChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (((TitleBar)d).AutoConfigureCustomTitleBar)
|
||||
{
|
||||
((TitleBar)d).Configure();
|
||||
}
|
||||
else
|
||||
{
|
||||
((TitleBar)d).Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum DisplayMode
|
||||
{
|
||||
Standard,
|
||||
Tall,
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.UI;
|
||||
using Microsoft.UI.Input;
|
||||
using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Windows.Foundation;
|
||||
using Windows.Graphics;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls;
|
||||
|
||||
[TemplatePart(Name = nameof(PART_FooterPresenter), Type = typeof(ContentPresenter))]
|
||||
[TemplatePart(Name = nameof(PART_ContentPresenter), Type = typeof(ContentPresenter))]
|
||||
|
||||
public partial class TitleBar : Control
|
||||
{
|
||||
#pragma warning disable SA1306 // Field names should begin with lower-case letter
|
||||
#pragma warning disable SA1310 // Field names should not contain underscore
|
||||
#pragma warning disable SA1400 // Access modifier should be declared
|
||||
#pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
ContentPresenter? PART_ContentPresenter;
|
||||
ContentPresenter? PART_FooterPresenter;
|
||||
#pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
#pragma warning restore SA1400 // Access modifier should be declared
|
||||
#pragma warning restore SA1306 // Field names should begin with lower-case letter
|
||||
#pragma warning restore SA1310 // Field names should not contain underscore
|
||||
|
||||
private void SetWASDKTitleBar()
|
||||
{
|
||||
if (this.Window == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (AutoConfigureCustomTitleBar)
|
||||
{
|
||||
Window.AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
|
||||
this.Window.SizeChanged -= Window_SizeChanged;
|
||||
this.Window.SizeChanged += Window_SizeChanged;
|
||||
this.Window.Activated -= Window_Activated;
|
||||
this.Window.Activated += Window_Activated;
|
||||
|
||||
if (Window.Content is FrameworkElement rootElement)
|
||||
{
|
||||
UpdateCaptionButtons(rootElement);
|
||||
rootElement.ActualThemeChanged += (s, e) =>
|
||||
{
|
||||
UpdateCaptionButtons(rootElement);
|
||||
};
|
||||
}
|
||||
|
||||
PART_ContentPresenter = GetTemplateChild(nameof(PART_ContentPresenter)) as ContentPresenter;
|
||||
PART_FooterPresenter = GetTemplateChild(nameof(PART_FooterPresenter)) as ContentPresenter;
|
||||
|
||||
// Get caption button occlusion information.
|
||||
int captionButtonOcclusionWidthRight = Window.AppWindow.TitleBar.RightInset;
|
||||
int captionButtonOcclusionWidthLeft = Window.AppWindow.TitleBar.LeftInset;
|
||||
PART_LeftPaddingColumn!.Width = new GridLength(captionButtonOcclusionWidthLeft);
|
||||
PART_RightPaddingColumn!.Width = new GridLength(captionButtonOcclusionWidthRight);
|
||||
|
||||
if (DisplayMode == DisplayMode.Tall)
|
||||
{
|
||||
// Choose a tall title bar to provide more room for interactive elements
|
||||
// like search box or person picture controls.
|
||||
Window.AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
|
||||
}
|
||||
else
|
||||
{
|
||||
Window.AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Standard;
|
||||
}
|
||||
|
||||
// Recalculate the drag region for the custom title bar
|
||||
// if you explicitly defined new draggable areas.
|
||||
SetDragRegionForCustomTitleBar();
|
||||
|
||||
_isAutoConfigCompleted = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_SizeChanged(object sender, WindowSizeChangedEventArgs args)
|
||||
{
|
||||
UpdateVisualStateAndDragRegion(args.Size);
|
||||
}
|
||||
|
||||
private void UpdateCaptionButtons(FrameworkElement rootElement)
|
||||
{
|
||||
Window.AppWindow.TitleBar.ButtonBackgroundColor = Colors.Transparent;
|
||||
Window.AppWindow.TitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
|
||||
if (rootElement.ActualTheme == ElementTheme.Dark)
|
||||
{
|
||||
Window.AppWindow.TitleBar.ButtonForegroundColor = Colors.White;
|
||||
Window.AppWindow.TitleBar.ButtonInactiveForegroundColor = Colors.DarkGray;
|
||||
}
|
||||
else
|
||||
{
|
||||
Window.AppWindow.TitleBar.ButtonForegroundColor = Colors.Black;
|
||||
Window.AppWindow.TitleBar.ButtonInactiveForegroundColor = Colors.DarkGray;
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetWASDKTitleBar()
|
||||
{
|
||||
if (this.Window == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Only reset if we were the ones who configured
|
||||
if (_isAutoConfigCompleted)
|
||||
{
|
||||
Window.AppWindow.TitleBar.ExtendsContentIntoTitleBar = false;
|
||||
this.Window.SizeChanged -= Window_SizeChanged;
|
||||
this.Window.Activated -= Window_Activated;
|
||||
SizeChanged -= this.TitleBar_SizeChanged;
|
||||
Window.AppWindow.TitleBar.ResetToDefault();
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_Activated(object sender, WindowActivatedEventArgs args)
|
||||
{
|
||||
if (args.WindowActivationState == WindowActivationState.Deactivated)
|
||||
{
|
||||
VisualStateManager.GoToState(this, WindowDeactivatedState, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager.GoToState(this, WindowActivatedState, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDragRegionForCustomTitleBar()
|
||||
{
|
||||
if (AutoConfigureCustomTitleBar && Window is not null)
|
||||
{
|
||||
ClearDragRegions(NonClientRegionKind.Passthrough);
|
||||
#pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
var items = new FrameworkElement?[] { PART_ContentPresenter, PART_FooterPresenter, PART_ButtonHolder };
|
||||
#pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
var validItems = items.Where(x => x is not null).Select(x => x!).ToArray(); // Prune null items
|
||||
|
||||
SetDragRegion(NonClientRegionKind.Passthrough, validItems);
|
||||
}
|
||||
}
|
||||
|
||||
public double GetRasterizationScaleForElement(UIElement element)
|
||||
{
|
||||
if (element.XamlRoot != null)
|
||||
{
|
||||
return element.XamlRoot.RasterizationScale;
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
public void SetDragRegion(NonClientRegionKind nonClientRegionKind, params FrameworkElement[] frameworkElements)
|
||||
{
|
||||
List<RectInt32> rects = new List<RectInt32>();
|
||||
var scale = GetRasterizationScaleForElement(this);
|
||||
|
||||
foreach (var frameworkElement in frameworkElements)
|
||||
{
|
||||
if (frameworkElement == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
GeneralTransform transformElement = frameworkElement.TransformToVisual(null);
|
||||
Rect bounds = transformElement.TransformBounds(new Rect(0, 0, frameworkElement.ActualWidth, frameworkElement.ActualHeight));
|
||||
var transparentRect = new RectInt32(
|
||||
_X: (int)Math.Round(bounds.X * scale),
|
||||
_Y: (int)Math.Round(bounds.Y * scale),
|
||||
_Width: (int)Math.Round(bounds.Width * scale),
|
||||
_Height: (int)Math.Round(bounds.Height * scale));
|
||||
rects.Add(transparentRect);
|
||||
}
|
||||
|
||||
if (rects.Count > 0)
|
||||
{
|
||||
InputNonClientPointerSource.GetForWindowId(Window.AppWindow.Id).SetRegionRects(nonClientRegionKind, rects.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearDragRegions(NonClientRegionKind nonClientRegionKind)
|
||||
{
|
||||
InputNonClientPointerSource.GetForWindowId(Window.AppWindow.Id).ClearRegionRects(nonClientRegionKind);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
// 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.Controls;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls;
|
||||
|
||||
[TemplateVisualState(Name = BackButtonVisibleState, GroupName = BackButtonStates)]
|
||||
[TemplateVisualState(Name = BackButtonCollapsedState, GroupName = BackButtonStates)]
|
||||
[TemplateVisualState(Name = PaneButtonVisibleState, GroupName = PaneButtonStates)]
|
||||
[TemplateVisualState(Name = PaneButtonCollapsedState, GroupName = PaneButtonStates)]
|
||||
[TemplateVisualState(Name = WindowActivatedState, GroupName = ActivationStates)]
|
||||
[TemplateVisualState(Name = WindowDeactivatedState, GroupName = ActivationStates)]
|
||||
[TemplateVisualState(Name = StandardState, GroupName = DisplayModeStates)]
|
||||
[TemplateVisualState(Name = TallState, GroupName = DisplayModeStates)]
|
||||
[TemplateVisualState(Name = IconVisibleState, GroupName = IconStates)]
|
||||
[TemplateVisualState(Name = IconCollapsedState, GroupName = IconStates)]
|
||||
[TemplateVisualState(Name = ContentVisibleState, GroupName = ContentStates)]
|
||||
[TemplateVisualState(Name = ContentCollapsedState, GroupName = ContentStates)]
|
||||
[TemplateVisualState(Name = FooterVisibleState, GroupName = FooterStates)]
|
||||
[TemplateVisualState(Name = FooterCollapsedState, GroupName = FooterStates)]
|
||||
[TemplateVisualState(Name = WideState, GroupName = ReflowStates)]
|
||||
[TemplateVisualState(Name = NarrowState, GroupName = ReflowStates)]
|
||||
[TemplatePart(Name = PartBackButton, Type = typeof(Button))]
|
||||
[TemplatePart(Name = PartPaneButton, Type = typeof(Button))]
|
||||
[TemplatePart(Name = nameof(PART_LeftPaddingColumn), Type = typeof(ColumnDefinition))]
|
||||
[TemplatePart(Name = nameof(PART_RightPaddingColumn), Type = typeof(ColumnDefinition))]
|
||||
[TemplatePart(Name = nameof(PART_ButtonHolder), Type = typeof(StackPanel))]
|
||||
|
||||
public partial class TitleBar : Control
|
||||
{
|
||||
private const string PartBackButton = "PART_BackButton";
|
||||
private const string PartPaneButton = "PART_PaneButton";
|
||||
|
||||
private const string BackButtonVisibleState = "BackButtonVisible";
|
||||
private const string BackButtonCollapsedState = "BackButtonCollapsed";
|
||||
private const string BackButtonStates = "BackButtonStates";
|
||||
|
||||
private const string PaneButtonVisibleState = "PaneButtonVisible";
|
||||
private const string PaneButtonCollapsedState = "PaneButtonCollapsed";
|
||||
private const string PaneButtonStates = "PaneButtonStates";
|
||||
|
||||
private const string WindowActivatedState = "Activated";
|
||||
private const string WindowDeactivatedState = "Deactivated";
|
||||
private const string ActivationStates = "WindowActivationStates";
|
||||
|
||||
private const string IconVisibleState = "IconVisible";
|
||||
private const string IconCollapsedState = "IconCollapsed";
|
||||
private const string IconStates = "IconStates";
|
||||
|
||||
private const string StandardState = "Standard";
|
||||
private const string TallState = "Tall";
|
||||
private const string DisplayModeStates = "DisplayModeStates";
|
||||
|
||||
private const string ContentVisibleState = "ContentVisible";
|
||||
private const string ContentCollapsedState = "ContentCollapsed";
|
||||
private const string ContentStates = "ContentStates";
|
||||
|
||||
private const string FooterVisibleState = "FooterVisible";
|
||||
private const string FooterCollapsedState = "FooterCollapsed";
|
||||
private const string FooterStates = "FooterStates";
|
||||
|
||||
private const string WideState = "Wide";
|
||||
private const string NarrowState = "Narrow";
|
||||
private const string ReflowStates = "ReflowStates";
|
||||
|
||||
#pragma warning disable SA1306 // Field names should begin with lower-case letter
|
||||
#pragma warning disable SA1310 // Field names should not contain underscore
|
||||
#pragma warning disable SA1400 // Access modifier should be declared
|
||||
#pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
ColumnDefinition? PART_RightPaddingColumn;
|
||||
ColumnDefinition? PART_LeftPaddingColumn;
|
||||
StackPanel? PART_ButtonHolder;
|
||||
#pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
#pragma warning restore SA1400 // Access modifier should be declared
|
||||
#pragma warning restore SA1306 // Field names should begin with lower-case letter
|
||||
#pragma warning restore SA1310 // Field names should not contain underscore
|
||||
|
||||
// We only want to reset TitleBar configuration in app, if we're the TitleBar instance that's managing that state.
|
||||
private bool _isAutoConfigCompleted;
|
||||
|
||||
public TitleBar()
|
||||
{
|
||||
this.DefaultStyleKey = typeof(TitleBar);
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate()
|
||||
{
|
||||
PART_LeftPaddingColumn = GetTemplateChild(nameof(PART_LeftPaddingColumn)) as ColumnDefinition;
|
||||
PART_RightPaddingColumn = GetTemplateChild(nameof(PART_RightPaddingColumn)) as ColumnDefinition;
|
||||
ConfigureButtonHolder();
|
||||
Configure();
|
||||
if (GetTemplateChild(PartBackButton) is Button backButton)
|
||||
{
|
||||
backButton.Click -= BackButton_Click;
|
||||
backButton.Click += BackButton_Click;
|
||||
}
|
||||
|
||||
if (GetTemplateChild(PartPaneButton) is Button paneButton)
|
||||
{
|
||||
paneButton.Click -= PaneButton_Click;
|
||||
paneButton.Click += PaneButton_Click;
|
||||
}
|
||||
|
||||
SizeChanged -= this.TitleBar_SizeChanged;
|
||||
SizeChanged += this.TitleBar_SizeChanged;
|
||||
|
||||
Update();
|
||||
base.OnApplyTemplate();
|
||||
}
|
||||
|
||||
private void TitleBar_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
UpdateVisualStateAndDragRegion(e.NewSize);
|
||||
}
|
||||
|
||||
private void UpdateVisualStateAndDragRegion(Size size)
|
||||
{
|
||||
if (size.Width <= CompactStateBreakpoint)
|
||||
{
|
||||
if (Content != null || Footer != null)
|
||||
{
|
||||
VisualStateManager.GoToState(this, NarrowState, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager.GoToState(this, WideState, true);
|
||||
}
|
||||
|
||||
SetDragRegionForCustomTitleBar();
|
||||
}
|
||||
|
||||
private void BackButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BackButtonClick?.Invoke(this, new RoutedEventArgs());
|
||||
}
|
||||
|
||||
private void PaneButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PaneButtonClick?.Invoke(this, new RoutedEventArgs());
|
||||
}
|
||||
|
||||
private void ConfigureButtonHolder()
|
||||
{
|
||||
if (PART_ButtonHolder != null)
|
||||
{
|
||||
PART_ButtonHolder.SizeChanged -= PART_ButtonHolder_SizeChanged;
|
||||
}
|
||||
|
||||
PART_ButtonHolder = GetTemplateChild(nameof(PART_ButtonHolder)) as StackPanel;
|
||||
|
||||
if (PART_ButtonHolder != null)
|
||||
{
|
||||
PART_ButtonHolder.SizeChanged += PART_ButtonHolder_SizeChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void PART_ButtonHolder_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
SetDragRegionForCustomTitleBar();
|
||||
}
|
||||
|
||||
private void Configure()
|
||||
{
|
||||
SetWASDKTitleBar();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
ResetWASDKTitleBar();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Icon != null)
|
||||
{
|
||||
VisualStateManager.GoToState(this, IconVisibleState, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager.GoToState(this, IconCollapsedState, true);
|
||||
}
|
||||
|
||||
VisualStateManager.GoToState(this, IsBackButtonVisible ? BackButtonVisibleState : BackButtonCollapsedState, true);
|
||||
VisualStateManager.GoToState(this, IsPaneButtonVisible ? PaneButtonVisibleState : PaneButtonCollapsedState, true);
|
||||
|
||||
if (DisplayMode == DisplayMode.Tall)
|
||||
{
|
||||
VisualStateManager.GoToState(this, TallState, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager.GoToState(this, StandardState, true);
|
||||
}
|
||||
|
||||
if (Content != null)
|
||||
{
|
||||
VisualStateManager.GoToState(this, ContentVisibleState, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager.GoToState(this, ContentCollapsedState, true);
|
||||
}
|
||||
|
||||
if (Footer != null)
|
||||
{
|
||||
VisualStateManager.GoToState(this, FooterVisibleState, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager.GoToState(this, FooterCollapsedState, true);
|
||||
}
|
||||
|
||||
SetDragRegionForCustomTitleBar();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
<ResourceDictionary
|
||||
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:local="using:Microsoft.PowerToys.Settings.UI.Controls">
|
||||
|
||||
<x:Double x:Key="TitleBarCompactHeight">32</x:Double>
|
||||
<x:Double x:Key="TitleBarTallHeight">48</x:Double>
|
||||
<x:Double x:Key="TitleBarContentMinWidth">360</x:Double>
|
||||
<Style BasedOn="{StaticResource DefaultTitleBarStyle}" TargetType="local:TitleBar" />
|
||||
|
||||
<Style x:Key="DefaultTitleBarStyle" TargetType="local:TitleBar">
|
||||
<Setter Property="MinHeight" Value="{ThemeResource TitleBarCompactHeight}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="local:TitleBar">
|
||||
<Grid
|
||||
x:Name="PART_RootGrid"
|
||||
Height="{TemplateBinding MinHeight}"
|
||||
Padding="4,0,0,0"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="PART_LeftPaddingColumn" Width="0" />
|
||||
<ColumnDefinition x:Name="PART_ButtonsHolderColumn" Width="Auto" />
|
||||
<ColumnDefinition x:Name="PART_IconColumn" Width="Auto" />
|
||||
<ColumnDefinition x:Name="PART_TitleColumn" Width="Auto" />
|
||||
<ColumnDefinition
|
||||
x:Name="PART_LeftDragColumn"
|
||||
Width="*"
|
||||
MinWidth="4" />
|
||||
<ColumnDefinition x:Name="PART_ContentColumn" Width="Auto" />
|
||||
<ColumnDefinition
|
||||
x:Name="PART_RightDragColumn"
|
||||
Width="*"
|
||||
MinWidth="4" />
|
||||
<ColumnDefinition x:Name="PART_FooterColumn" Width="Auto" />
|
||||
<ColumnDefinition x:Name="PART_RightPaddingColumn" Width="0" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
x:Name="PART_IconHolder"
|
||||
Grid.Column="2"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center">
|
||||
<Viewbox
|
||||
x:Name="PART_Icon"
|
||||
MaxWidth="16"
|
||||
MaxHeight="16">
|
||||
<ContentPresenter
|
||||
x:Name="PART_IconPresenter"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Content="{TemplateBinding Icon}"
|
||||
HighContrastAdjustment="None" />
|
||||
</Viewbox>
|
||||
</Border>
|
||||
|
||||
<StackPanel
|
||||
x:Name="PART_TitleHolder"
|
||||
Grid.Column="3"
|
||||
Margin="16,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal"
|
||||
Spacing="4">
|
||||
<TextBlock
|
||||
x:Name="PART_TitleText"
|
||||
MinWidth="48"
|
||||
Margin="0,0,0,1"
|
||||
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{TemplateBinding Title}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap" />
|
||||
<TextBlock
|
||||
x:Name="PART_SubtitleText"
|
||||
MinWidth="48"
|
||||
Margin="0,0,0,1"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{TemplateBinding Subtitle}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap" />
|
||||
</StackPanel>
|
||||
<Grid
|
||||
x:Name="PART_DragRegion"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="6"
|
||||
Background="Transparent" />
|
||||
<StackPanel
|
||||
x:Name="PART_ButtonHolder"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="PART_BackButton"
|
||||
Style="{ThemeResource TitleBarBackButtonStyle}"
|
||||
ToolTipService.ToolTip="Back" />
|
||||
<Button
|
||||
x:Name="PART_PaneButton"
|
||||
Style="{StaticResource TitleBarPaneToggleButtonStyle}"
|
||||
ToolTipService.ToolTip="Toggle menu" />
|
||||
</StackPanel>
|
||||
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Grid.Column="5"
|
||||
MinWidth="{ThemeResource TitleBarContentMinWidth}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Content="{TemplateBinding Content}" />
|
||||
<ContentPresenter
|
||||
x:Name="PART_FooterPresenter"
|
||||
Grid.Column="7"
|
||||
Margin="4,0,8,0"
|
||||
HorizontalContentAlignment="Right"
|
||||
Content="{TemplateBinding Footer}" />
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="BackButtonStates">
|
||||
<VisualState x:Name="BackButtonVisible" />
|
||||
<VisualState x:Name="BackButtonCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_BackButton.Visibility" Value="Collapsed" />
|
||||
<Setter Target="PART_BackButton.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="PaneButtonStates">
|
||||
<VisualState x:Name="PaneButtonVisible" />
|
||||
<VisualState x:Name="PaneButtonCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_PaneButton.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="IconStates">
|
||||
<VisualState x:Name="IconVisible" />
|
||||
<VisualState x:Name="IconCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_IconHolder.Visibility" Value="Collapsed" />
|
||||
<Setter Target="PART_TitleHolder.Margin" Value="4,0,0,0" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="ContentStates">
|
||||
<VisualState x:Name="ContentVisible" />
|
||||
<VisualState x:Name="ContentCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_ContentPresenter.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="FooterStates">
|
||||
<VisualState x:Name="FooterVisible" />
|
||||
<VisualState x:Name="FooterCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_FooterPresenter.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="ReflowStates">
|
||||
<VisualState x:Name="Wide" />
|
||||
<VisualState x:Name="Narrow">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_TitleHolder.Visibility" Value="Collapsed" />
|
||||
<Setter Target="PART_LeftDragColumn.Width" Value="Auto" />
|
||||
<Setter Target="PART_RightDragColumn.Width" Value="Auto" />
|
||||
<Setter Target="PART_RightDragColumn.MinWidth" Value="16" />
|
||||
<Setter Target="PART_LeftDragColumn.MinWidth" Value="16" />
|
||||
<Setter Target="PART_ContentColumn.Width" Value="*" />
|
||||
<!-- Content can stretch now -->
|
||||
<Setter Target="PART_ContentPresenter.MinWidth" Value="0" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="WindowActivationStates">
|
||||
<VisualState x:Name="Activated" />
|
||||
<VisualState x:Name="Deactivated">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_TitleText.Foreground" Value="{ThemeResource TextFillColorDisabledBrush}" />
|
||||
<Setter Target="PART_SubtitleText.Foreground" Value="{ThemeResource TextFillColorDisabledBrush}" />
|
||||
<Setter Target="PART_BackButton.IsEnabled" Value="False" />
|
||||
<Setter Target="PART_PaneButton.IsEnabled" Value="False" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="DisplayModeStates">
|
||||
<VisualState x:Name="Standard" />
|
||||
<VisualState x:Name="Tall">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PART_RootGrid.MinHeight" Value="{ThemeResource TitleBarTallHeight}" />
|
||||
<Setter Target="PART_RootGrid.Padding" Value="4" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Copy of WinUI NavigationBackButtonNormalStyle - cannot use it as it picks up the generic.xaml version, not the WinUI version -->
|
||||
<Style x:Key="TitleBarBackButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="{ThemeResource NavigationViewBackButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource NavigationViewItemForegroundChecked}" />
|
||||
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="MaxHeight" Value="40" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
||||
<Setter Property="Content" Value="" />
|
||||
<Setter Property="Padding" Value="12,4,12,4" />
|
||||
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid
|
||||
x:Name="RootGrid"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<AnimatedIcon
|
||||
x:Name="Content"
|
||||
Width="16"
|
||||
Height="16"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
AnimatedIcon.State="Normal"
|
||||
AutomationProperties.AccessibilityView="Raw">
|
||||
<animatedvisuals:AnimatedBackVisualSource />
|
||||
<AnimatedIcon.FallbackIconSource>
|
||||
<FontIconSource
|
||||
FontFamily="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FontFamily}"
|
||||
FontSize="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FontSize}"
|
||||
Glyph="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"
|
||||
MirroredWhenRightToLeft="True" />
|
||||
</AnimatedIcon.FallbackIconSource>
|
||||
</AnimatedIcon>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonBackgroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonForegroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Content.(AnimatedIcon.State)" Value="PointerOver" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonBackgroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonForegroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Content.(AnimatedIcon.State)" Value="Pressed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Disabled">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonForegroundDisabled}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Copy of WinUI PaneToggleButtonStyle - cannot use it as it picks up the generic.xaml version, not the WinUI version -->
|
||||
<Style x:Key="TitleBarPaneToggleButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="{ThemeResource NavigationViewBackButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource NavigationViewItemForegroundChecked}" />
|
||||
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="MaxHeight" Value="40" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
||||
<Setter Property="Content" Value="" />
|
||||
<Setter Property="Padding" Value="12,4,12,4" />
|
||||
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid
|
||||
x:Name="RootGrid"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<AnimatedIcon
|
||||
x:Name="Content"
|
||||
Width="16"
|
||||
Height="16"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
AnimatedIcon.State="Normal"
|
||||
AutomationProperties.AccessibilityView="Raw">
|
||||
<animatedvisuals:AnimatedGlobalNavigationButtonVisualSource />
|
||||
<AnimatedIcon.FallbackIconSource>
|
||||
<FontIconSource
|
||||
FontFamily="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FontFamily}"
|
||||
FontSize="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FontSize}"
|
||||
Glyph="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"
|
||||
MirroredWhenRightToLeft="True" />
|
||||
</AnimatedIcon.FallbackIconSource>
|
||||
</AnimatedIcon>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonBackgroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonForegroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Content.(AnimatedIcon.State)" Value="PointerOver" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonBackgroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonForegroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Content.(AnimatedIcon.State)" Value="Pressed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Disabled">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource NavigationViewButtonForegroundDisabled}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.AdvancedPastePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -12,7 +12,7 @@
|
||||
x:Name="RootPage"
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Default">
|
||||
@@ -38,7 +38,7 @@
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
<Grid>
|
||||
<controls:SettingsPageControl x:Uid="AdvancedPaste" ModuleImageSource="ms-appx:///Assets/Settings/Modules/AdvancedPaste.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
@@ -425,4 +425,4 @@
|
||||
</StackPanel>
|
||||
</ContentDialog>
|
||||
</Grid>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -15,7 +15,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class AdvancedPastePage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class AdvancedPastePage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private AdvancedPasteViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -136,4 +136,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_AlwaysOnTop" Link="https://aka.ms/PowerToysOverview_AlwaysOnTop" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class AlwaysOnTopPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class AlwaysOnTopPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private AlwaysOnTopViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -14,9 +14,9 @@
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:AwakeModeToIntConverter x:Key="AwakeModeToIntConverter" />
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
|
||||
<controls:SettingsPageControl
|
||||
x:Uid="Awake"
|
||||
@@ -119,4 +119,4 @@
|
||||
<controls:PageLink x:Uid="SecondaryLink_Awake" Link="https://awake.den.dev" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -17,7 +17,7 @@ using PowerToys.GPOWrapper;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class AwakePage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class AwakePage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private readonly string _appName = "Awake";
|
||||
private readonly SettingsUtils _settingsUtils;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.CmdNotFoundPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -170,4 +170,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_CmdNotFound" Link="https://aka.ms/PowerToysOverview_CmdNotFound" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -8,7 +8,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class CmdNotFoundPage : NavigatablePage
|
||||
public sealed partial class CmdNotFoundPage : NavigablePage
|
||||
{
|
||||
private CmdNotFoundViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.CmdPalPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -52,4 +52,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_CmdPal" Link="https://aka.ms/PowerToysOverview_CmdPal" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -13,7 +13,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class CmdPalPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class CmdPalPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private CmdPalViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -232,4 +232,4 @@
|
||||
<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>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
@@ -15,7 +15,7 @@ using Microsoft.Windows.ApplicationModel.Resources;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class ColorPickerPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class ColorPickerPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
public ColorPickerViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -66,4 +66,4 @@
|
||||
<controls:PageLink Link="https://github.com/kevinguo305" Text="Kevin Guo" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class CropAndLockPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class CropAndLockPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private CropAndLockViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.DashboardPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -14,7 +14,7 @@
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
DataContext="DashboardViewModel"
|
||||
mc:Ignorable="d">
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:ModuleItemTemplateSelector
|
||||
x:Key="ModuleItemTemplateSelector"
|
||||
ActivationTemplate="{StaticResource ModuleItemActivationTemplate}"
|
||||
@@ -74,7 +74,7 @@
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
<Grid Margin="16,0,0,0" RowSpacing="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -363,4 +363,4 @@
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// <summary>
|
||||
/// Dashboard Settings Page.
|
||||
/// </summary>
|
||||
public sealed partial class DashboardPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class DashboardPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets view model.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.EnvironmentVariablesPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -53,4 +53,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_EnvironmentVariables" Link="https://aka.ms/PowerToysOverview_EnvironmentVariables" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class EnvironmentVariablesPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class EnvironmentVariablesPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private EnvironmentVariablesViewModel ViewModel { get; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -299,4 +299,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_FancyZones" Link="https://aka.ms/PowerToysOverview_FancyZones" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class FancyZonesPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class FancyZonesPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private FancyZonesViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -53,4 +53,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_FileLocksmith" Link="https://aka.ms/PowerToysOverview_FileLocksmith" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class FileLocksmithPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class FileLocksmithPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private FileLocksmithViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -12,10 +12,10 @@
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:UpdateStateToBoolConverter x:Key="UpdateStateToBoolConverter" />
|
||||
<converters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" />
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
@@ -517,4 +517,4 @@
|
||||
<controls:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// <summary>
|
||||
/// General Settings Page.
|
||||
/// </summary>
|
||||
public sealed partial class GeneralPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class GeneralPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private static DateTime OkToHideBackupAndRestoreMessageTime { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -86,4 +86,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_Hosts" Link="https://aka.ms/PowerToysOverview_HostsFileEditor" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class HostsPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class HostsPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private HostsViewModel ViewModel { get; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -14,7 +14,7 @@
|
||||
x:Name="RootPage"
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:ImageResizerFitToStringConverter x:Key="ImageResizerFitToStringConverter" />
|
||||
<converters:ImageResizerFitToIntConverter x:Key="ImageResizerFitToIntConverter" />
|
||||
<converters:ImageResizerUnitToStringConverter x:Key="ImageResizerUnitToStringConverter" />
|
||||
@@ -27,7 +27,7 @@
|
||||
x:Key="BoolToComboBoxIndexConverter"
|
||||
FalseValue="1"
|
||||
TrueValue="0" />
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
<controls:SettingsPageControl x:Uid="ImageResizer" ModuleImageSource="ms-appx:///Assets/Settings/Modules/ImageResizer.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
|
||||
@@ -303,4 +303,4 @@
|
||||
<controls:PageLink Link="https://github.com/bricelam/ImageResizer/" Text="Brice Lambson's ImageResizer" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
@@ -14,7 +14,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class ImageResizerPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class ImageResizerPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
public ImageResizerViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.KeyboardManagerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -13,7 +13,7 @@
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<tkconverters:CollectionVisibilityConverter x:Key="CollectionVisibilityConverter" />
|
||||
<Style x:Name="KeysListViewContainerStyle" TargetType="ListViewItem">
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
@@ -51,7 +51,7 @@
|
||||
Height="56">
|
||||
|
||||
</DataTemplate>-->
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="KeyboardManager" ModuleImageSource="ms-appx:///Assets/Settings/Modules/KBM.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
@@ -235,4 +235,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_KBM" Link="https://aka.ms/PowerToysOverview_KeyboardManager" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class KeyboardManagerPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class KeyboardManagerPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private const string PowerToyName = "Keyboard Manager";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -108,4 +108,4 @@
|
||||
<controls:PageLink x:Uid="Attribution_Rooler" Link="https://github.com/peteblois/rooler" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class MeasureToolPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class MeasureToolPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private MeasureToolViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -13,13 +13,13 @@
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:IndexBitFieldToVisibilityConverter x:Key="IndexBitFieldToVisibilityConverter" />
|
||||
<tkconverters:BoolToVisibilityConverter
|
||||
x:Key="BoolToInvertedVisibilityConverter"
|
||||
FalseValue="Visible"
|
||||
TrueValue="Collapsed" />
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
<controls:SettingsPageControl x:Uid="MouseUtils" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseUtils.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
|
||||
@@ -423,4 +423,4 @@
|
||||
<controls:PageLink Link="https://michael-clayton.com/projects/fancymouse" Text="Michael Clayton's Mouse Jump (FancyMouse)" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -12,7 +12,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class MouseUtilsPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class MouseUtilsPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private MouseUtilsViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -11,13 +11,13 @@
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:BoolToVisibilityConverter x:Key="negativeBoolToVisibilityConverter" />
|
||||
<converters:BoolToObjectConverter
|
||||
x:Key="OneRowMatrixBoolToNumberOfRowsConverter"
|
||||
FalseValue="2"
|
||||
TrueValue="4" />
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
<controls:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel Orientation="Vertical">
|
||||
@@ -524,4 +524,4 @@
|
||||
<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>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -21,7 +21,7 @@ using static Microsoft.PowerToys.Settings.UI.ViewModels.MouseWithoutBordersViewM
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class MouseWithoutBordersPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class MouseWithoutBordersPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private const string MouseWithoutBordersDragDropCheckString = "MWB Device Drag Drop";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<helper:NavigatablePage
|
||||
<helper:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.NewPlusPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -215,4 +215,4 @@
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
|
||||
</helper:NavigatablePage>
|
||||
</helper:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class NewPlusPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class NewPlusPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private NewPlusViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -104,4 +104,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_Peek" Link="https://aka.ms/PowerToysOverview_Peek" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class PeekPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class PeekPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private PeekViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -11,7 +11,7 @@
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<CollectionViewSource
|
||||
x:Name="LanguagesCustomViewSource"
|
||||
IsSourceGrouped="True"
|
||||
@@ -19,7 +19,7 @@
|
||||
<DataTemplate x:Key="LanguageViewTemplate" x:DataType="Lib:PowerAccentLanguageModel">
|
||||
<TextBlock Text="{x:Bind Language}" />
|
||||
</DataTemplate>
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
|
||||
<controls:SettingsPageControl
|
||||
x:Uid="QuickAccent"
|
||||
@@ -241,4 +241,4 @@
|
||||
<controls:PageLink Link="https://github.com/damienleroy/PowerAccent" Text="Damien Leroy's PowerAccent" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -11,7 +11,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class PowerAccentPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class PowerAccentPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private PowerAccentViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerLauncherPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -15,7 +15,7 @@
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<Style x:Key="OptionSeparator" TargetType="Rectangle">
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
@@ -304,7 +304,7 @@
|
||||
<DataTemplate x:Key="EmptyTemplate" x:DataType="viewModels:PluginAdditionalOptionViewModel">
|
||||
<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical" />
|
||||
</DataTemplate>
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="PowerLauncher" ModuleImageSource="ms-appx:///Assets/Settings/Modules/Run.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
@@ -816,4 +816,4 @@
|
||||
<controls:PageLink Link="https://github.com/betsegaw/windowwalker/" Text="Beta Tadele's Window Walker" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -15,7 +15,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class PowerLauncherPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class PowerLauncherPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
public PowerLauncherViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -79,4 +79,4 @@
|
||||
<controls:PageLink Link="https://github.com/TheJoeFin/Text-Grab" Text="Based upon Joseph Finney's Text Grab" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class PowerOcrPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class PowerOcrPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private PowerOcrViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -289,4 +289,4 @@
|
||||
<controls:PageLink Link="https://www.pedrolamas.com" Text="Pedro Lamas's work on G-Code, Binary G-Code, STL, and QOI" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class PowerPreviewPage : NavigatablePage
|
||||
public sealed partial class PowerPreviewPage : NavigablePage
|
||||
{
|
||||
public PowerPreviewViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -100,4 +100,4 @@
|
||||
<controls:PageLink Link="https://github.com/chrdavis/SmartRename" Text="Chris Davis's SmartRenamer" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class PowerRenamePage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class PowerRenamePage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private PowerRenameViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -57,4 +57,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_RegistryPreview" Link="https://aka.ms/PowerToysOverview_RegistryPreview" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -8,7 +8,7 @@ using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class RegistryPreviewPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class RegistryPreviewPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private RegistryPreviewViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
|
||||
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers"
|
||||
@@ -11,7 +12,6 @@
|
||||
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="using:Microsoft.PowerToys.Settings.UI.ViewModels"
|
||||
xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views"
|
||||
@@ -98,17 +98,17 @@
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<tkcontrols:TitleBar
|
||||
<controls:TitleBar
|
||||
x:Name="AppTitleBar"
|
||||
AutoConfigureCustomTitleBar="True"
|
||||
PaneButtonClick="PaneToggleBtn_Click">
|
||||
<tkcontrols:TitleBar.Resources>
|
||||
<controls:TitleBar.Resources>
|
||||
<x:Double x:Key="TitleBarContentMinWidth">516</x:Double>
|
||||
</tkcontrols:TitleBar.Resources>
|
||||
<tkcontrols:TitleBar.Icon>
|
||||
</controls:TitleBar.Resources>
|
||||
<controls:TitleBar.Icon>
|
||||
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/Settings/icon.ico" />
|
||||
</tkcontrols:TitleBar.Icon>
|
||||
<tkcontrols:TitleBar.Content>
|
||||
</controls:TitleBar.Icon>
|
||||
<controls:TitleBar.Content>
|
||||
<AutoSuggestBox
|
||||
x:Name="SearchBox"
|
||||
x:Uid="Shell_SearchBox"
|
||||
@@ -129,8 +129,8 @@
|
||||
Modifiers="Control" />
|
||||
</AutoSuggestBox.KeyboardAccelerators>
|
||||
</AutoSuggestBox>
|
||||
</tkcontrols:TitleBar.Content>
|
||||
</tkcontrols:TitleBar>
|
||||
</controls:TitleBar.Content>
|
||||
</controls:TitleBar>
|
||||
<NavigationView
|
||||
x:Name="navigationView"
|
||||
Grid.Row="1"
|
||||
|
||||
@@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
||||
using Common.Search;
|
||||
using Common.Search.FuzzSearch;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Controls;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Services;
|
||||
@@ -132,7 +133,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
|
||||
public static bool IsUserAnAdmin { get; set; }
|
||||
|
||||
public CommunityToolkit.WinUI.Controls.TitleBar TitleBar => AppTitleBar;
|
||||
public Controls.TitleBar TitleBar => AppTitleBar;
|
||||
|
||||
private Dictionary<Type, NavigationViewItem> _navViewParentLookup = new Dictionary<Type, NavigationViewItem>();
|
||||
private List<string> _searchSuggestions = [];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
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"
|
||||
@@ -136,4 +136,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_ShortcutGuide" Link="https://aka.ms/PowerToysOverview_ShortcutGuide" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class ShortcutGuidePage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class ShortcutGuidePage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private ShortcutGuideViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.WorkspacesPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -57,4 +57,4 @@
|
||||
<controls:PageLink x:Uid="LearnMore_Workspaces" Link="https://aka.ms/PowerToysOverview_Workspaces" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class WorkspacesPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class WorkspacesPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private WorkspacesViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<local:NavigatablePage
|
||||
<local:NavigablePage
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.ZoomItPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -12,10 +12,10 @@
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<local:NavigatablePage.Resources>
|
||||
<local:NavigablePage.Resources>
|
||||
<converters:ZoomItInitialZoomConverter x:Key="ZoomItInitialZoomConverter" />
|
||||
<converters:ZoomItTypeSpeedSliderConverter x:Key="ZoomItTypeSpeedSliderConverter" />
|
||||
</local:NavigatablePage.Resources>
|
||||
</local:NavigablePage.Resources>
|
||||
|
||||
<controls:SettingsPageControl
|
||||
x:Uid="ZoomIt"
|
||||
@@ -275,4 +275,4 @@
|
||||
<controls:PageLink Link="https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit" Text="Sysinternals Zoomit by Mark Russinovich, Alex Mihaiuc, John Stephens" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</local:NavigatablePage>
|
||||
</local:NavigablePage>
|
||||
|
||||
@@ -12,7 +12,7 @@ using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class ZoomItPage : NavigatablePage, IRefreshablePage
|
||||
public sealed partial class ZoomItPage : NavigablePage, IRefreshablePage
|
||||
{
|
||||
private ZoomItViewModel ViewModel { get; set; }
|
||||
|
||||
|
||||
@@ -2691,6 +2691,12 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
|
||||
<value>Shortcuts with **Ctrl** and **Alt** may remove functionality from some international keyboards, because **Ctrl** + **Alt** = **Alt Gr** in those keyboards.</value>
|
||||
<comment>The ** sequences are used for text formatting of the key names. Don't remove them on translation.</comment>
|
||||
</data>
|
||||
<data name="WarningShortcutConflict.Title" xml:space="preserve">
|
||||
<value>Shortcut conflict</value>
|
||||
</data>
|
||||
<data name="WarningShortcutConflict.ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>A conflict has been detected for this shortcut.</value>
|
||||
</data>
|
||||
<data name="FancyZones_SpanZonesAcrossMonitors.Description" xml:space="preserve">
|
||||
<value>All monitors must have the same DPI scaling and will be treated as one large combined rectangle which contains all monitors</value>
|
||||
</data>
|
||||
|
||||
@@ -145,6 +145,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
// Get current hotkey settings (fresh from file) using the accessor's getter
|
||||
module.HotkeySettings = hotkeyAccessor.Value;
|
||||
module.HotkeySettings.ConflictDescription = isSystemConflict
|
||||
? ResourceLoaderInstance.ResourceLoader.GetString("SysHotkeyConflictTooltipText")
|
||||
: ResourceLoaderInstance.ResourceLoader.GetString("InAppHotkeyConflictTooltipText");
|
||||
|
||||
// Set header using localization key
|
||||
module.Header = GetHotkeyLocalizationHeader(module.ModuleName, module.HotkeyID, hotkeyAccessor.LocalizationHeaderKey);
|
||||
|
||||
Reference in New Issue
Block a user