fix: update TimePicker to correctly handle second selector panel type. (#856)
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
Name="{x:Static u:TimePickerPresenter.PART_SecondSelector}"
|
Name="{x:Static u:TimePickerPresenter.PART_SecondSelector}"
|
||||||
MinWidth="64"
|
MinWidth="64"
|
||||||
ItemHeight="32"
|
ItemHeight="32"
|
||||||
PanelType="Minute"
|
PanelType="Second"
|
||||||
ShouldLoop="True" />
|
ShouldLoop="True" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class TimePickerPresenter : TemplatedControl
|
|||||||
else if (part[0] == 's' && !panels.Contains(_secondScrollPanel))
|
else if (part[0] == 's' && !panels.Contains(_secondScrollPanel))
|
||||||
{
|
{
|
||||||
panels.Add(_secondScrollPanel);
|
panels.Add(_secondScrollPanel);
|
||||||
_secondSelector?.SetValue(DateTimePickerPanel.ItemFormatProperty, part.Replace('s', 'm'));
|
_secondSelector?.SetValue(DateTimePickerPanel.ItemFormatProperty, part);
|
||||||
}
|
}
|
||||||
else if (part[0] == 't' && !panels.Contains(_ampmScrollPanel))
|
else if (part[0] == 't' && !panels.Contains(_ampmScrollPanel))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user