diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/BindTransformers.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/BindTransformers.cs index d0c3652193..22e68fdb4a 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/BindTransformers.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/BindTransformers.cs @@ -27,4 +27,7 @@ internal static class BindTransformers public static Visibility VisibleWhenAny(bool value1, bool value2) => (value1 || value2) ? Visibility.Visible : Visibility.Collapsed; + + public static Thickness BottomBorderThicknessWhenAll(bool value1, bool value2) + => value1 && value2 ? new Thickness(0, 0, 0, 1) : new Thickness(0); } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml index 4333a20867..9745c92490 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml @@ -206,7 +206,7 @@ HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderBrush="{ThemeResource CmdPal.TopBarBorderBrush}" - BorderThickness="0,0,0,1"> + BorderThickness="{x:Bind h:BindTransformers.BottomBorderThicknessWhenAll(ViewModel.IsSearchBoxVisible, ExpandedMode), Mode=OneWay}"> @@ -596,7 +596,6 @@ -