From 603168240e2e53f0012f832e1206f9b0eee4952e Mon Sep 17 00:00:00 2001 From: Yimeng Wu Date: Mon, 13 Nov 2023 22:47:51 +0000 Subject: [PATCH] Port microsoft/microsoft-ui-xaml#4469 (#610) --- ModernWpf.Controls/NumberBox/NumberBox.xaml | 14 +++++++++++--- test/ModernWpfTestApp/NumberBoxPage.xaml | 11 +++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ModernWpf.Controls/NumberBox/NumberBox.xaml b/ModernWpf.Controls/NumberBox/NumberBox.xaml index 92df4d23..b3919a16 100644 --- a/ModernWpf.Controls/NumberBox/NumberBox.xaml +++ b/ModernWpf.Controls/NumberBox/NumberBox.xaml @@ -38,7 +38,6 @@ - @@ -187,6 +186,7 @@ IsTabStop="False" Visibility="Collapsed" FontSize="{TemplateBinding FontSize}" + HorizontalAlignment="Right" MinWidth="34" VerticalAlignment="Stretch" ui:TextBoxHelper.IsDeleteButton="True" /> @@ -259,6 +259,8 @@ + + @@ -268,7 +270,7 @@ M 19.091797 14.970703 L 10 5.888672 L 0.908203 14.970703 L 0.029297 14.091797 L 10 4.111328 L 19.970703 14.091797 Z - + @@ -332,7 +334,7 @@ - + @@ -366,6 +368,10 @@ FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" FontFamily="{TemplateBinding FontFamily}" + BorderThickness="{TemplateBinding BorderThickness}" + BorderBrush="{TemplateBinding BorderBrush}" + Padding="{TemplateBinding Padding}" + Foreground="{TemplateBinding Foreground}" TextAlignment="{TemplateBinding TextAlignment}" ui:ControlHelper.CornerRadius="{TemplateBinding CornerRadius}" /> @@ -416,6 +422,7 @@ Grid.Column="1" Visibility="Collapsed" FontSize="{TemplateBinding FontSize}" + BorderBrush="{TemplateBinding BorderBrush}" Content="{StaticResource ChevronUp}" Style="{StaticResource NumberBoxSpinButtonStyle}" ui:ControlHelper.CornerRadius="0" /> @@ -426,6 +433,7 @@ Grid.Column="2" Visibility="Collapsed" FontSize="{TemplateBinding FontSize}" + BorderBrush="{TemplateBinding BorderBrush}" Content="{StaticResource ChevronDown}" Style="{StaticResource NumberBoxSpinButtonStyle}" ui:ControlHelper.CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource RightCornerRadiusFilterConverter}}" /> diff --git a/test/ModernWpfTestApp/NumberBoxPage.xaml b/test/ModernWpfTestApp/NumberBoxPage.xaml index 99a92e7b..8777e2f9 100644 --- a/test/ModernWpfTestApp/NumberBoxPage.xaml +++ b/test/ModernWpfTestApp/NumberBoxPage.xaml @@ -161,8 +161,15 @@ - - + + + + +