From bd4e058c6f6db5f66c09a20d5789b1fc6eda5ede Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Tue, 17 Sep 2024 14:31:49 +0200 Subject: [PATCH 1/5] Initial pass --- .../WindowsCommandPalette/MainWindow.xaml | 69 +- .../WindowsCommandPalette/MainWindow.xaml.cs | 2 +- .../Views/DetailsControl.xaml | 59 +- .../WindowsCommandPalette/Views/FormPage.xaml | 73 +- .../WindowsCommandPalette/Views/ListPage.xaml | 634 ++++++++++++++---- .../WindowsCommandPalette/Views/MainPage.xaml | 19 +- .../Views/MarkdownPage.xaml | 174 ++--- 7 files changed, 713 insertions(+), 317 deletions(-) diff --git a/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml index 0eea0f3992..b1b5b4fe1a 100644 --- a/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml +++ b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml @@ -1,4 +1,4 @@ - + - + - - + + - - - - - + + + - - - + + + - - - - - + + + - - + + - + \ No newline at end of file diff --git a/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs index 876290519d..e390ab73d4 100644 --- a/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs +++ b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs @@ -124,7 +124,7 @@ public sealed partial class MainWindow : Window private void PositionCentered() { - _appWindow.Resize(new SizeInt32 { Width = 860, Height = 512 }); + _appWindow.Resize(new SizeInt32 { Width = 860, Height = 560 }); DisplayArea displayArea = DisplayArea.GetFromWindowId(_appWindow.Id, DisplayAreaFallback.Nearest); if (displayArea is not null) { diff --git a/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml b/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml index 47f3681eb0..86a64fc6b7 100644 --- a/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml +++ b/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml @@ -1,10 +1,10 @@ - + @@ -14,34 +14,41 @@ - - + + - - - + + + - + + + - - - - + Visibility="{x:Bind ViewModel.Title, Converter={StaticResource StringNotEmptyToVisibilityConverter}, Mode=OneWay}" /> + + - - - + \ No newline at end of file diff --git a/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml index 2a7ee6b70f..5f0fa59cd5 100644 --- a/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml +++ b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml @@ -3,56 +3,65 @@ x:Class="WindowsCommandPalette.Views.FormPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:WindowsCommandPalette.Views" xmlns:ac="using:AdaptiveCards.Rendering.WinUI3" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="using:WindowsCommandPalette.Views" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d" Background="Transparent" - Loaded="Page_Loaded"> + Loaded="Page_Loaded" + mc:Ignorable="d"> - + - + - + - - + + + + + diff --git a/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml b/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml index 1e47b93148..ee77d198ae 100644 --- a/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml +++ b/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml @@ -60,73 +60,36 @@ - - - - - + Padding="12" + KeyDown="RootGrid_KeyDown" + RowSpacing="16"> - - - - - - - - - - + - - - - - - - - - + Margin="0,-2,0,0" + VerticalAlignment="Center" + Style="{StaticResource BodyStrongTextBlockStyle}" + Text="{x:Bind ViewModel.Page.Name}" /> - + + - + + Glyph="" + Visibility="{x:Bind ViewModel.Nested, Mode=OneWay, Converter={StaticResource ReverseBoolToVisibilityConverter}}" /> - - - - - - - - + @@ -287,7 +290,7 @@ diff --git a/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml b/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml index ee77d198ae..5b660c077a 100644 --- a/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml +++ b/src/modules/cmdpal/WindowsCommandPalette/Views/MarkdownPage.xaml @@ -3,6 +3,7 @@ x:Class="WindowsCommandPalette.Views.MarkdownPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="using:WindowsCommandPalette.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:devpal="using:WindowsCommandPalette" xmlns:local="using:WindowsCommandPalette.Views" @@ -15,7 +16,7 @@ - + @@ -82,6 +83,7 @@