<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:local="clr-namespace:ModernWpf.MahApps.Controls">

    <DataTemplate x:Key="IconTemplate">
        <ui:FontIconFallback Data="{Binding}" />
    </DataTemplate>

    <Style TargetType="local:DateTimeComponentSelector">
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
        <Setter Property="UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <local:DateTimeComponentSelectorPanel Orientation="Vertical" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <ControlTemplate.Resources>
                        <StreamGeometry x:Key="ChevronDown">M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z</StreamGeometry>
                        <StreamGeometry x:Key="ChevronUp">M 19.091797 14.970703 L 10 5.888672 L 0.908203 14.970703 L 0.029297 14.091797 L 10 4.111328 L 19.970703 14.091797 Z</StreamGeometry>
                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="True">
                        <ScrollViewer
                            x:Name="ScrollViewer"
                            VerticalScrollBarVisibility="Hidden"
                            HorizontalScrollBarVisibility="Disabled"
                            Focusable="false">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                        <RepeatButton
                            x:Name="UpButton"
                            Content="{StaticResource ChevronUp}"
                            ContentTemplate="{StaticResource IconTemplate}"
                            FontFamily="{DynamicResource SymbolThemeFontFamily}"
                            FontSize="8"
                            Height="22"
                            Padding="0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Top"
                            Visibility="Collapsed"
                            Style="{DynamicResource DateTimePickerFlyoutButtonStyle}"
                            Background="{DynamicResource LoopingSelectorButtonBackground}"
                            IsTabStop="False" />
                        <RepeatButton
                            x:Name="DownButton"
                            Content="{StaticResource ChevronDown}"
                            ContentTemplate="{StaticResource IconTemplate}"
                            FontFamily="{DynamicResource SymbolThemeFontFamily}"
                            FontSize="8"
                            Height="22"
                            Padding="0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Bottom"
                            Visibility="Collapsed"
                            Style="{DynamicResource DateTimePickerFlyoutButtonStyle}"
                            Background="{DynamicResource LoopingSelectorButtonBackground}"
                            IsTabStop="False" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="UpButton" Property="Visibility" Value="Visible" />
                            <Setter TargetName="DownButton" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:DateTimeComponentSelectorItem">
        <Setter Property="Height" Value="{DynamicResource TimePickerFlyoutPresenterItemHeight}" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
        <Setter Property="Foreground" Value="{DynamicResource LoopingSelectorItemForeground}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DateTimeComponentSelectorItem">
                    <Grid
                        x:Name="Root"
                        Background="Transparent"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            TextElement.Foreground="{TemplateBinding Foreground}"
                            Margin="2,0,2,0"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True" />
                                <Condition Binding="{Binding SuppressItemMouseOver, RelativeSource={RelativeSource AncestorType={x:Type local:DateTimeComponentSelector}}}" Value="False" />
                            </MultiDataTrigger.Conditions>
                            <Setter TargetName="Root" Property="Background" Value="{DynamicResource LoopingSelectorItemBackgroundPointerOver}" />
                            <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource LoopingSelectorItemForegroundPointerOver}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource LoopingSelectorItemForegroundSelected}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:SimpleTimePicker">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
        <Setter Property="Foreground" Value="{DynamicResource TimePickerButtonForeground}" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="UseSystemFocusVisuals" Value="{DynamicResource IsApplicationFocusVisualKindReveal}" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
        <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
        <Setter Property="PickerVisibility" Value="HourMinute" />
        <Setter Property="MinutesItemStringFormat" Value="D2" />
        <Setter Property="SecondsItemStringFormat" Value="D2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SimpleTimePicker">
                    <ControlTemplate.Resources>
                        <StreamGeometry x:Key="Accept">M 6.25 17.138672 L 0.185547 11.064453 L 1.064453 10.185547 L 6.25 15.361328 L 18.935547 2.685547 L 19.814453 3.564453 L 6.25 17.138672 Z</StreamGeometry>
                        <StreamGeometry x:Key="Cancel">M 10.888672 10 L 17.626953 16.748047 L 16.748047 17.626953 L 10 10.888672 L 3.251953 17.626953 L 2.373047 16.748047 L 9.111328 10 L 2.373047 3.251953 L 3.251953 2.373047 L 10 9.111328 L 16.748047 2.373047 L 17.626953 3.251953 Z</StreamGeometry>
                    </ControlTemplate.Resources>
                    
                    <Grid
                        x:Name="LayoutRoot"
                        Margin="{TemplateBinding Padding}"
                        SnapsToDevicePixels="True">

                        <Grid.Resources>
                            <Style x:Key="TimePickerFlyoutButtonStyle" TargetType="Button">
                                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid Background="{TemplateBinding Background}">
                                                <Border
                                                    x:Name="Border"
                                                    BorderBrush="{DynamicResource TimePickerButtonBorderBrush}"
                                                    Background="{DynamicResource TimePickerButtonBackground}"
                                                    BorderThickness="{DynamicResource TimePickerBorderThemeThickness}"
                                                    CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
                                                    <ContentPresenter
                                                        x:Name="ContentPresenter"
                                                        TextElement.Foreground="{TemplateBinding Foreground}"
                                                        HorizontalAlignment="Stretch"
                                                        VerticalAlignment="Stretch" />
                                                </Border>
                                            </Grid>

                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsMouseOver" Value="True">
                                                    <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource TimePickerButtonBorderBrushPointerOver}" />
                                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource TimePickerButtonBackgroundPointerOver}" />
                                                    <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource TimePickerButtonForegroundPointerOver}" />
                                                </Trigger>
                                                <Trigger Property="IsPressed" Value="True">
                                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource TimePickerButtonBackgroundPressed}" />
                                                    <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource TimePickerButtonBorderBrushPressed}" />
                                                    <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource TimePickerButtonForegroundPressed}" />
                                                </Trigger>
                                                <Trigger Property="IsEnabled" Value="False">
                                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource TimePickerButtonBackgroundDisabled}" />
                                                    <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource TimePickerButtonBorderBrushDisabled}" />
                                                    <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource TimePickerButtonForegroundDisabled}" />
                                                </Trigger>
                                                <!-- Focused -->
                                                <Trigger Property="ui:FocusVisualHelper.ShowFocusVisual" Value="True">
                                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource TimePickerButtonBackgroundFocused}" />
                                                    <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource TimePickerButtonForegroundFocused}" />
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <local:DateTimeComponentSelectorItemsConverter x:Key="ItemsConverter" />
                        </Grid.Resources>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <ui:ContentPresenterEx
                            x:Name="HeaderContentPresenter"
                            Grid.Row="0"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            Margin="{DynamicResource TimePickerTopHeaderMargin}"
                            MaxWidth="{DynamicResource TimePickerThemeMaxWidth}"
                            Foreground="{DynamicResource TimePickerHeaderForeground}"
                            TextWrapping="Wrap"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Top"
                            Visibility="{TemplateBinding ui:ControlHelper.HeaderVisibility}" />
                        <Button
                            x:Name="PART_Button"
                            Grid.Row="1"
                            Style="{StaticResource TimePickerFlyoutButtonStyle}"
                            Foreground="{TemplateBinding Foreground}"
                            Background="{TemplateBinding Background}"
                            IsEnabled="{TemplateBinding IsEnabled}"
                            MinWidth="{DynamicResource TimePickerThemeMinWidth}"
                            MaxWidth="{DynamicResource TimePickerThemeMaxWidth}"
                            HorizontalAlignment="Stretch"
                            HorizontalContentAlignment="Stretch"
                            VerticalAlignment="Top"
                            ui:FocusVisualHelper.UseSystemFocusVisuals="{TemplateBinding UseSystemFocusVisuals}"
                            FocusVisualStyle="{TemplateBinding FocusVisualStyle}"
                            ui:ControlHelper.CornerRadius="{TemplateBinding CornerRadius}">
                            <Grid x:Name="FlyoutButtonContentGrid">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" x:Name="FirstTextBlockColumn" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" x:Name="SecondTextBlockColumn" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" x:Name="ThirdTextBlockColumn" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" x:Name="FourthTextBlockColumn" />
                                </Grid.ColumnDefinitions>
                                <Border
                                    x:Name="FirstPickerHost"
                                    Grid.Column="0">
                                    <TextBlock
                                        x:Name="HourTextBlock"
                                        TextAlignment="Center"
                                        Padding="{DynamicResource TimePickerHostPadding}"
                                        FontFamily="{TemplateBinding FontFamily}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        FontSize="{TemplateBinding FontSize}" />
                                </Border>
                                <Rectangle
                                    x:Name="FirstColumnDivider"
                                    Fill="{DynamicResource TimePickerSpacerFill}"
                                    HorizontalAlignment="Center"
                                    Width="{DynamicResource TimePickerSpacerThemeWidth}"
                                    Grid.Column="1" />
                                <Border
                                    x:Name="SecondPickerHost"
                                    Grid.Column="2">
                                    <TextBlock
                                        x:Name="MinuteTextBlock"
                                        TextAlignment="Center"
                                        Padding="{DynamicResource TimePickerHostPadding}"
                                        FontFamily="{TemplateBinding FontFamily}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        FontSize="{TemplateBinding FontSize}" />
                                </Border>
                                <Rectangle
                                    x:Name="SecondColumnDivider"
                                    Fill="{DynamicResource TimePickerSpacerFill}"
                                    HorizontalAlignment="Center"
                                    Width="{DynamicResource TimePickerSpacerThemeWidth}"
                                    Grid.Column="3" />
                                <Border
                                    x:Name="ThirdPickerHost"
                                    Grid.Column="4">
                                    <TextBlock
                                        x:Name="SecondTextBlock"
                                        TextAlignment="Center"
                                        Padding="{DynamicResource TimePickerHostPadding}"
                                        FontFamily="{TemplateBinding FontFamily}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        FontSize="{TemplateBinding FontSize}" />
                                </Border>
                                <Rectangle
                                    x:Name="ThirdColumnDivider"
                                    Fill="{DynamicResource TimePickerSpacerFill}"
                                    HorizontalAlignment="Center"
                                    Width="{DynamicResource TimePickerSpacerThemeWidth}"
                                    Grid.Column="5" />
                                <Border
                                    x:Name="FourthPickerHost"
                                    Grid.Column="6">
                                    <TextBlock
                                        x:Name="PeriodTextBlock"
                                        TextAlignment="Center"
                                        Padding="{DynamicResource TimePickerHostPadding}"
                                        FontFamily="{TemplateBinding FontFamily}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        FontSize="{TemplateBinding FontSize}" />
                                </Border>
                            </Grid>
                        </Button>

                        <Popup
                            x:Name="PART_Popup"
                            Grid.Row="1"
                            AllowsTransparency="True"
                            Focusable="False"
                            Placement="Center"
                            PlacementTarget="{Binding ElementName=PART_Button}"
                            VerticalOffset="{DynamicResource TimePickerPopupVerticalOffset}"
                            PopupAnimation="None"
                            StaysOpen="False">
                            <ui:ThemeShadowChrome
                                MinWidth="{Binding ActualWidth, ElementName=PART_Button}"
                                IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}"
                                CornerRadius="{DynamicResource OverlayCornerRadius}">
                                <Border
                                    x:Name="Background"
                                    Background="{DynamicResource TimePickerFlyoutPresenterBackground}"
                                    CornerRadius="{DynamicResource OverlayCornerRadius}">
                                    <Border
                                        BorderBrush="{DynamicResource TimePickerFlyoutPresenterBorderBrush}"
                                        BorderThickness="{DynamicResource DateTimeFlyoutBorderThickness}"
                                        CornerRadius="{DynamicResource OverlayCornerRadius}"
                                        Padding="{DynamicResource DateTimeFlyoutBorderPadding}">
                                        <Grid x:Name="ContentPanel">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="*" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="*" x:Name="FirstPickerHostColumn" />
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" x:Name="SecondPickerHostColumn" />
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" x:Name="ThirdPickerHostColumn" />
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" x:Name="FourthPickerHostColumn" />
                                                </Grid.ColumnDefinitions>
                                                <Rectangle
                                                    x:Name="HighlightRect"
                                                    Fill="{DynamicResource TimePickerFlyoutPresenterHighlightFill}"
                                                    Grid.Column="0"
                                                    Grid.ColumnSpan="7"
                                                    VerticalAlignment="Center"
                                                    Height="{DynamicResource TimePickerFlyoutPresenterHighlightHeight}" />
                                                <local:DateTimeComponentSelector
                                                    x:Name="PART_HourPicker"
                                                    Grid.Column="0"
                                                    ItemStringFormat="{TemplateBinding HoursItemStringFormat}"
                                                    ItemsSource="{TemplateBinding SourceHours, Converter={StaticResource ItemsConverter}}" />
                                                <Rectangle
                                                    x:Name="FirstPickerSpacing"
                                                    Fill="{DynamicResource TimePickerFlyoutPresenterSpacerFill}"
                                                    HorizontalAlignment="Center"
                                                    Width="{DynamicResource TimePickerSpacerThemeWidth}"
                                                    Grid.Column="1" />
                                                <local:DateTimeComponentSelector
                                                    x:Name="PART_MinutePicker"
                                                    Grid.Column="2"
                                                    ItemStringFormat="{TemplateBinding MinutesItemStringFormat}"
                                                    ItemsSource="{TemplateBinding SourceMinutes, Converter={StaticResource ItemsConverter}}" />
                                                <Rectangle
                                                    x:Name="SecondPickerSpacing"
                                                    Fill="{DynamicResource TimePickerFlyoutPresenterSpacerFill}"
                                                    HorizontalAlignment="Center"
                                                    Width="{DynamicResource TimePickerSpacerThemeWidth}"
                                                    Grid.Column="3" />
                                                <local:DateTimeComponentSelector
                                                    x:Name="PART_SecondPicker"
                                                    Grid.Column="4"
                                                    ItemStringFormat="{TemplateBinding SecondsItemStringFormat}"
                                                    ItemsSource="{TemplateBinding SourceSeconds, Converter={StaticResource ItemsConverter}}" />
                                                <Rectangle
                                                    x:Name="ThirdPickerSpacing"
                                                    Fill="{DynamicResource TimePickerFlyoutPresenterSpacerFill}"
                                                    HorizontalAlignment="Center"
                                                    Width="{DynamicResource TimePickerSpacerThemeWidth}"
                                                    Grid.Column="5" />
                                                <local:DateTimeComponentSelector
                                                    x:Name="PART_AmPmSwitcher"
                                                    Grid.Column="6" />
                                            </Grid>
                                            <Grid
                                                Grid.Row="1"
                                                Height="{DynamicResource TimePickerFlyoutPresenterAcceptDismissHostGridHeight}"
                                                x:Name="AcceptDismissHostGrid">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="*" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Rectangle
                                                    Height="{DynamicResource TimePickerSpacerThemeWidth}"
                                                    VerticalAlignment="Top"
                                                    Fill="{DynamicResource TimePickerFlyoutPresenterSpacerFill}"
                                                    Grid.ColumnSpan="2" />
                                                <Button
                                                    x:Name="AcceptButton"
                                                    Grid.Column="0"
                                                    Content="{StaticResource Accept}"
                                                    ContentTemplate="{StaticResource IconTemplate}"
                                                    FontFamily="{DynamicResource SymbolThemeFontFamily}"
                                                    FontSize="16"
                                                    HorizontalAlignment="Stretch"
                                                    VerticalAlignment="Stretch"
                                                    Style="{DynamicResource DateTimePickerFlyoutButtonStyle}"
                                                    IsDefault="True" />
                                                <Button
                                                    x:Name="DismissButton"
                                                    Grid.Column="1"
                                                    Content="{StaticResource Cancel}"
                                                    ContentTemplate="{StaticResource IconTemplate}"
                                                    FontFamily="{DynamicResource SymbolThemeFontFamily}"
                                                    FontSize="16"
                                                    HorizontalAlignment="Stretch"
                                                    VerticalAlignment="Stretch"
                                                    Style="{DynamicResource DateTimePickerFlyoutButtonStyle}"
                                                    IsCancel="True" />
                                            </Grid>
                                        </Grid>
                                    </Border>
                                </Border>
                            </ui:ThemeShadowChrome>
                        </Popup>

                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="HeaderContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource TimePickerHeaderForegroundDisabled}" />
                            <Setter TargetName="FirstColumnDivider" Property="Fill" Value="{DynamicResource TimePickerSpacerFillDisabled}" />
                            <Setter TargetName="SecondColumnDivider" Property="Fill" Value="{DynamicResource TimePickerSpacerFillDisabled}" />
                            <Setter TargetName="ThirdColumnDivider" Property="Fill" Value="{DynamicResource TimePickerSpacerFillDisabled}" />
                        </Trigger>
                        <!-- HasNoTime -->
                        <Trigger Property="SelectedDateTime" Value="{x:Null}">
                            <Setter TargetName="HourTextBlock" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}" />
                            <Setter TargetName="MinuteTextBlock" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}" />
                            <Setter TargetName="SecondTextBlock" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}" />
                            <Setter TargetName="PeriodTextBlock" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}" />
                        </Trigger>
                        <Trigger SourceName="PART_HourPicker" Property="Visibility" Value="Collapsed">
                            <Setter TargetName="FirstTextBlockColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="FirstColumnDivider" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="FirstPickerHost" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="FirstPickerHostColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="FirstPickerSpacing" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger SourceName="PART_MinutePicker" Property="Visibility" Value="Collapsed">
                            <Setter TargetName="SecondTextBlockColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="FirstColumnDivider" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="SecondPickerHost" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="SecondPickerHostColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="FirstPickerSpacing" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger SourceName="PART_SecondPicker" Property="Visibility" Value="Collapsed">
                            <Setter TargetName="ThirdTextBlockColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="SecondColumnDivider" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ThirdPickerHost" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ThirdPickerHostColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="SecondPickerSpacing" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger SourceName="PART_AmPmSwitcher" Property="Visibility" Value="Collapsed">
                            <Setter TargetName="FourthTextBlockColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="ThirdColumnDivider" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="FourthPickerHost" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="FourthPickerHostColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="ThirdPickerSpacing" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>