feat: redesign NumericUpDown.

This commit is contained in:
Zhang Dian 2024-03-11 19:52:11 +08:00
parent 46e57925b9
commit 4d14c846b0
2 changed files with 20 additions and 1 deletions

View File

@ -8,6 +8,24 @@
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel Orientation="Horizontal">
<NumericUpDown Classes="Large" Width="150" ButtonSpinnerLocation="Left"/>
<NumericUpDown Width="150" ShowButtonSpinner="False" />
<NumericUpDown Classes="Small" Width="150" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<NumericUpDown Width="150" ButtonSpinnerLocation="Left" />
<NumericUpDown Width="150" ShowButtonSpinner="False" />
<NumericUpDown Width="150" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<NumericUpDown Width="150" ShowButtonSpinner="False" />
<NumericUpDown IsEnabled="False" Width="150" />
<NumericUpDown Width="150" ButtonSpinnerLocation="Left" />
</StackPanel>
<NumericUpDown
Width="200"
Maximum="100"
@ -44,4 +62,4 @@
Maximum="100"
Minimum="0" />
</StackPanel>
</UserControl>
</UserControl>

View File

@ -4,6 +4,7 @@
x:CompileBindings="True">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
<Setter Property="NumericUpDown.VerticalAlignment" Value="Center" />
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" />
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
<Setter Property="NumericUpDown.Template">