Fix TimePicker to respect custom Width property (#20507)

* Fix TimePicker to respect Width by removing MinWidth from internal Button

* Add MinWidth to DatePicker for consistency
This commit is contained in:
Evan
2026-01-21 04:06:02 -06:00
committed by GitHub
parent 93eeadf3c1
commit 65adcde081
2 changed files with 5 additions and 2 deletions
@@ -93,6 +93,7 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
IsEnabled="{TemplateBinding IsEnabled}"
MinWidth="{TemplateBinding MinWidth}"
MaxWidth="{TemplateBinding MaxWidth}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
@@ -78,6 +78,8 @@
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="MinWidth" Value="{DynamicResource TimePickerThemeMinWidth}" />
<Setter Property="MaxWidth" Value="{DynamicResource TimePickerThemeMaxWidth}" />
<Setter Property="Template">
<ControlTemplate>
<DataValidationErrors>
@@ -90,8 +92,8 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
IsEnabled="{TemplateBinding IsEnabled}"
MinWidth="{DynamicResource TimePickerThemeMinWidth}"
MaxWidth="{DynamicResource TimePickerThemeMaxWidth}"
MinWidth="{TemplateBinding MinWidth}"
MaxWidth="{TemplateBinding MaxWidth}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">