diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml
index 745dc31d95..f9a9e37ea1 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml
@@ -3,6 +3,7 @@
x:Class="Microsoft.CmdPal.UI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:controls="using:Microsoft.CmdPal.UI.Controls"
xmlns:local="using:Microsoft.CmdPal.UI">
@@ -15,11 +16,12 @@
+
240
-
+
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CheckBoxWithDescriptionControl.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CheckBoxWithDescriptionControl.cs
new file mode 100644
index 0000000000..df8711fe08
--- /dev/null
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CheckBoxWithDescriptionControl.cs
@@ -0,0 +1,76 @@
+// 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.ComponentModel;
+
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Automation;
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.CmdPal.UI.Controls;
+
+public partial class CheckBoxWithDescriptionControl : CheckBox
+{
+ private CheckBoxWithDescriptionControl _checkBoxSubTextControl;
+
+ public CheckBoxWithDescriptionControl()
+ {
+ _checkBoxSubTextControl = (CheckBoxWithDescriptionControl)this;
+ this.Loaded += CheckBoxSubTextControl_Loaded;
+ }
+
+ protected override void OnApplyTemplate()
+ {
+ Update();
+ base.OnApplyTemplate();
+ }
+
+ private void Update()
+ {
+ if (!string.IsNullOrEmpty(Header))
+ {
+ AutomationProperties.SetName(this, Header);
+ }
+ }
+
+ private void CheckBoxSubTextControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ StackPanel panel = new StackPanel() { Orientation = Orientation.Vertical };
+ panel.Children.Add(new TextBlock() { Text = Header, TextWrapping = TextWrapping.WrapWholeWords });
+
+ // Add text box only if the description is not empty. Required for additional plugin options.
+ if (!string.IsNullOrWhiteSpace(Description))
+ {
+ panel.Children.Add(new IsEnabledTextBlock() { Style = (Style)App.Current.Resources["SecondaryIsEnabledTextBlockStyle"], Text = Description });
+ }
+
+ _checkBoxSubTextControl.Content = panel;
+ }
+
+ public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
+ "Header",
+ typeof(string),
+ typeof(CheckBoxWithDescriptionControl),
+ new PropertyMetadata(default(string)));
+
+ public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register(
+ "Description",
+ typeof(string),
+ typeof(CheckBoxWithDescriptionControl),
+ new PropertyMetadata(default(string)));
+
+ [Localizable(true)]
+ public string Header
+ {
+ get => (string)GetValue(HeaderProperty);
+ set => SetValue(HeaderProperty, value);
+ }
+
+ [Localizable(true)]
+ public string Description
+ {
+ get => (string)GetValue(DescriptionProperty);
+ set => SetValue(DescriptionProperty, value);
+ }
+}
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IsEnabledTextBlock.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IsEnabledTextBlock.xaml
new file mode 100644
index 0000000000..8218d5bf21
--- /dev/null
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IsEnabledTextBlock.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IsEnabledTextBlock.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IsEnabledTextBlock.xaml.cs
new file mode 100644
index 0000000000..ffe65bc9f9
--- /dev/null
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IsEnabledTextBlock.xaml.cs
@@ -0,0 +1,51 @@
+// 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.ComponentModel;
+
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.CmdPal.UI.Controls;
+
+[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
+[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
+public partial class IsEnabledTextBlock : Control
+{
+ public IsEnabledTextBlock()
+ {
+ this.Style = (Style)App.Current.Resources["DefaultIsEnabledTextBlockStyle"];
+ }
+
+ protected override void OnApplyTemplate()
+ {
+ IsEnabledChanged -= IsEnabledTextBlock_IsEnabledChanged;
+ SetEnabledState();
+ IsEnabledChanged += IsEnabledTextBlock_IsEnabledChanged;
+ base.OnApplyTemplate();
+ }
+
+ public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
+ "Text",
+ typeof(string),
+ typeof(IsEnabledTextBlock),
+ null);
+
+ [Localizable(true)]
+ public string Text
+ {
+ get => (string)GetValue(TextProperty);
+ set => SetValue(TextProperty, value);
+ }
+
+ private void IsEnabledTextBlock_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ SetEnabledState();
+ }
+
+ private void SetEnabledState()
+ {
+ VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true);
+ }
+}
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj b/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj
index b41f20a5a1..f577f13898 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj
@@ -66,7 +66,9 @@
+
+
@@ -180,6 +182,18 @@
PreserveNewest
+
+
+
+ MSBuild:Compile
+
+
+
+
+
+ MSBuild:Compile
+
+
MSBuild:Compile
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionPage.xaml
index 5a495a2a21..72b51fd724 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionPage.xaml
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionPage.xaml
@@ -33,6 +33,10 @@
x:Key="StringEmptyToBoolConverter"
EmptyValue="False"
NotEmptyValue="True" />
+
@@ -47,22 +51,34 @@
MaxWidth="1000"
HorizontalAlignment="Stretch"
Spacing="{StaticResource SettingsCardSpacing}">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
@@ -84,22 +100,22 @@
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
@@ -130,11 +146,8 @@
-
-
-
@@ -145,8 +158,13 @@
Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Visibility="{x:Bind ViewModel.HasSettings}" />
-
-
+
-
-
-
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionsPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionsPage.xaml
index 56ec56fe20..f798134c10 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionsPage.xaml
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionsPage.xaml
@@ -25,7 +25,6 @@
MaxWidth="1000"
HorizontalAlignment="Stretch"
Spacing="{StaticResource SettingsCardSpacing}">
-
@@ -47,9 +46,7 @@
-
-
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml
index 21cee5407c..121b478189 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml
@@ -37,22 +37,20 @@
-
-
-
-
+
+
+
+
+
-
-
-
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw
index 76734a5568..ec7ce8b68c 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw
@@ -257,8 +257,8 @@ Right-click to remove the key combination, thereby deactivating the shortcut.Disabled
Displayed when an extension is disabled
-
- Enable this extension
+
+ Enable
Displayed on a toggle controlling the extension's enabled / disabled state
@@ -312,7 +312,13 @@ Right-click to remove the key combination, thereby deactivating the shortcut.Alias
- Typing this alias will navigate to this command. Direct aliases navigate as soon as you type the alias. Indirect aliases navigate after typing a trailing space.
+ A short keyword used to navigate to this command.
+
+
+ Alias activation
+
+
+ Choose when the alias runs. Direct runs as soon as you type the alias. Indirect runs after a trailing space.
Built-in
@@ -429,12 +435,15 @@ Right-click to remove the key combination, thereby deactivating the shortcut.Close
Close as a verb, as in Close the application
-
+
Direct
-
+
Indirect
+
+ Enter alias
+
Show status messages
@@ -454,7 +463,7 @@ Right-click to remove the key combination, thereby deactivating the shortcut.Trigger reload of the extension externally with the x-cmdpal://reload command
- For Developers
+ For developers
an untitled
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Styles/Settings.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Styles/Settings.xaml
index 0413bbe5cb..89c01814eb 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Styles/Settings.xaml
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Styles/Settings.xaml
@@ -2,7 +2,7 @@
-
+
4
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Themes/Generic.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Themes/Generic.xaml
deleted file mode 100644
index 6903d112e3..0000000000
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Themes/Generic.xaml
+++ /dev/null
@@ -1 +0,0 @@
-