Hello,
I tried to reduce minWidth with TimePickerHandler, but it doesn't work.
It is caused by that the minimal size of each Cell
in TimePicker
is 80.
You need to copy default style for TimePicker
from this file C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\Generic\generic.xaml
into Your_MAUI_Project\Platforms\Windows\App.xaml
, such as the following code:
<maui:MauiWinUIApplication
...>
<maui:MauiWinUIApplication.Resources>
<!-- Default style for TimePicker --> from xaml file.
</maui:MauiWinUIApplication.Resources>
</maui:MauiWinUIApplication>
Then, you need to modify MinWidth="{StaticResource TimePickerThemeMinWidth}"
to MinWidth="30
.
After that, you could find the TimePicker could be shown as expected.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.