From d432fcc68c42025e6cffa57910bd97e2901efa2b Mon Sep 17 00:00:00 2001 From: punker76 Date: Mon, 26 Feb 2024 23:11:28 +0100 Subject: [PATCH] fix: #4466 collapse colon between hours and minute of timepicker if hours collapsed Add also a new flag enum to show only minute and seconds. --- .../ExampleViews/DateExamples.xaml | 27 ++++------------- .../Controls/TimePicker/TimePartVisibility.cs | 1 + src/MahApps.Metro/Themes/DateTimePicker.xaml | 29 +++++++++++++++---- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/DateExamples.xaml b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/DateExamples.xaml index a7206ce82f..09ba9013f7 100644 --- a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/DateExamples.xaml +++ b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/DateExamples.xaml @@ -9,6 +9,7 @@ xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:system="clr-namespace:System;assembly=mscorlib" + xmlns:markup="clr-namespace:MetroDemo.Markup" d:DataContext="{d:DesignInstance local:MainWindowViewModel}" d:DesignHeight="600" d:DesignWidth="800" @@ -159,17 +160,8 @@ Grid.Row="1" Grid.Column="1" Margin="{StaticResource ControlMargin}" - SelectedItem="{x:Static mah:TimePartVisibility.All}"> - - - All - HourMinute - Hour - Minute - Second - - - + ItemsSource="{Binding Source={markup:EnumBindingSource {x:Type mah:TimePartVisibility}}, Mode=OneTime}" + SelectedItem="{x:Static mah:TimePartVisibility.All}" />