Make settings button work and add settings placeholder

This commit is contained in:
Aaron Junker
2025-07-27 20:29:36 +02:00
parent 7e2fc4481d
commit fa54b49fca
3 changed files with 9 additions and 2 deletions

View File

@@ -95,6 +95,7 @@
<ProjectCapability Include="Msix" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />

View File

@@ -20,12 +20,12 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<SelectorBar Grid.Column="0" Grid.Row="0" x:Name="WindowSelector" SelectionChanged="WindowSelectionChanged" />
<TextBox Grid.Column="1" Grid.Row="0" Height="32" Width="300" HorizontalAlignment="Right" VerticalContentAlignment="Center" x:Name="SearchBox" HorizontalContentAlignment="Right" TextChanged="SearchBox_TextChanged">
<TextBox Grid.Column="1" Grid.Row="0" Height="32" Width="300" HorizontalAlignment="Right" PlaceholderText="Search shortcuts" VerticalContentAlignment="Center" x:Name="SearchBox" HorizontalContentAlignment="Right" TextChanged="SearchBox_TextChanged">
<TextBox.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="F" Invoked="SearchBoy_KeyboardAcceleratorInvoked" />
</TextBox.KeyboardAccelerators>
</TextBox>
<Button Grid.Column="2" Grid.Row="0" HorizontalContentAlignment="Center">
<Button Grid.Column="2" Grid.Row="0" HorizontalContentAlignment="Center" Click="SettingsButton_Clicked">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE713;" />
</Button>
<Button Grid.Column="3" Grid.Row="0" HorizontalContentAlignment="Center" Click="CloseButton_Clicked">

View File

@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.IO;
using System.Text.Json;
using Common.UI;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.UI;
using Microsoft.UI.Windowing;
@@ -190,5 +191,10 @@ namespace ShortcutGuide
{
SearchBox.Focus(FocusState.Programmatic);
}
private void SettingsButton_Clicked(object sender, RoutedEventArgs e)
{
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.ShortcutGuide, true);
}
}
}