<commit_before>﻿<UserControl x:Class="MaterialDesignColors.WpfExample.Pickers"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:domain="clr-namespace:MaterialDesignDemo.Domain"
             xmlns:codeDisplayer="clr-namespace:CodeDisplayer;assembly=CodeDisplayer"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <AdornerDecorator>
        <ScrollViewer>
            <codeDisplayer:XamlDisplayerPanel >
                <TextBlock >Classic WPF DatePicker control with Material Design theme, and new TimePicker control:</TextBlock>
                <DatePicker Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:HintAssist.Hint="Pick Date" Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />
                <DatePicker x:Name="FutureDatePicker" Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" 
                        materialDesign:HintAssist.Hint="Future Date">
                    <DatePicker.SelectedDate>
                        <Binding Path="FutureValidatingDate" UpdateSourceTrigger="PropertyChanged">
                            <Binding.ValidationRules>
                                <domain:FutureDateValidationRule ValidatesOnTargetUpdated="True" />
                            </Binding.ValidationRules>
                        </Binding>
                    </DatePicker.SelectedDate>
                </DatePicker>
                <ComboBox materialDesign:HintAssist.Hint="Language"
                          Style="{StaticResource MaterialDesignFloatingHintComboBox}"
                          materialDesign:HintAssist.HintOpacity=".26"
                          IsEditable="True" 
                          Name="LocaleCombo" HorizontalAlignment="Left" Width="100" Margin="0 32 0 0">
                    <ComboBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <VirtualizingStackPanel />
                        </ItemsPanelTemplate>
                    </ComboBox.ItemsPanel>
                </ComboBox>
                <DatePicker Name="LocaleDatePicker" Width="120" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:HintAssist.Hint="Locale Date" />
                <DatePicker Name="LocaleDatePickerRTL" Width="120" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:HintAssist.Hint="RTL Locale Date" FlowDirection="RightToLeft" />
                <materialDesign:TimePicker   VerticalAlignment="Top"  Width="100" HorizontalAlignment="Left" Margin="0 16 0 0"
                                   Style="{StaticResource MaterialDesignFloatingHintTimePicker}"
                                   materialDesign:HintAssist.Hint="Custom hint" />
                <materialDesign:TimePicker    Is24Hours="True" x:Name="PresetTimePicker" VerticalAlignment="Top"  Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" />
                <materialDesign:TimePicker                  
                                   materialDesign:HintAssist.Hint="Validates"
                                   IsInvalidTextAllowed="True"
                                   Is24Hours="True" VerticalAlignment="Top"  Width="100" HorizontalAlignment="Left" Margin="0 16 0 0">
                    <materialDesign:TimePicker.Text>
                        <Binding Path="ValidatingTime" UpdateSourceTrigger="PropertyChanged">
                            <Binding.ValidationRules>
                                <domain:SimpleDateValidationRule ValidatesOnTargetUpdated="True" />
                            </Binding.ValidationRules>
                        </Binding>
                    </materialDesign:TimePicker.Text>
                </materialDesign:TimePicker>

                <TextBlock MaxWidth="200" TextWrapping="Wrap">By combining the DialogHost (see MainWindow.xaml) and the Calendar and Clock controls, custom popups can be built.</TextBlock>
                <StackPanel  Orientation="Horizontal" Margin="0 32 0 0">
                    <TextBlock Text="{Binding Date, StringFormat=d}" VerticalAlignment="Center" FontSize="24" />
                    <Button Margin="8 0 0 0" Content="..." 
                    Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}"
                    materialDesign:DialogHost.DialogOpenedAttached="CalendarDialogOpenedEventHandler"
                    materialDesign:DialogHost.DialogClosingAttached="CalendarDialogClosingEventHandler">
                        <Button.CommandParameter>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" /><commit_msg>Added subheaders for Pickers.xaml of demo<commit_after>﻿<UserControl x:Class="MaterialDesignColors.WpfExample.Pickers"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:domain="clr-namespace:MaterialDesignDemo.Domain"
             xmlns:codeDisplayer="clr-namespace:CodeDisplayer;assembly=CodeDisplayer"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <AdornerDecorator>
        <ScrollViewer>
            <codeDisplayer:XamlDisplayerPanel HorizontalAlignment="Center">
                <TextBlock Style="{StaticResource MaterialDesignSubheadingTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Classic WPF DatePicker control with Material Design theme, and new TimePicker control:</TextBlock>
                <DatePicker Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:HintAssist.Hint="Pick Date" Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />
                <DatePicker x:Name="FutureDatePicker" Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" 
                        materialDesign:HintAssist.Hint="Future Date">
                    <DatePicker.SelectedDate>
                        <Binding Path="FutureValidatingDate" UpdateSourceTrigger="PropertyChanged">
                            <Binding.ValidationRules>
                                <domain:FutureDateValidationRule ValidatesOnTargetUpdated="True" />
                            </Binding.ValidationRules>
                        </Binding>
                    </DatePicker.SelectedDate>
                </DatePicker>
                <ComboBox materialDesign:HintAssist.Hint="Language"
                          Style="{StaticResource MaterialDesignFloatingHintComboBox}"
                          materialDesign:HintAssist.HintOpacity=".26"
                          IsEditable="True" 
                          Name="LocaleCombo" HorizontalAlignment="Left" Width="100" Margin="0 32 0 0">
                    <ComboBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <VirtualizingStackPanel />
                        </ItemsPanelTemplate>
                    </ComboBox.ItemsPanel>
                </ComboBox>
                <DatePicker Name="LocaleDatePicker" Width="120" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:HintAssist.Hint="Locale Date" />
                <DatePicker Name="LocaleDatePickerRTL" Width="120" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:HintAssist.Hint="RTL Locale Date" FlowDirection="RightToLeft" />
                <materialDesign:TimePicker   VerticalAlignment="Top"  Width="100" HorizontalAlignment="Left" Margin="0 16 0 0"
                                   Style="{StaticResource MaterialDesignFloatingHintTimePicker}"
                                   materialDesign:HintAssist.Hint="Custom hint" />
                <materialDesign:TimePicker    Is24Hours="True" x:Name="PresetTimePicker" VerticalAlignment="Top"  Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" />
                <materialDesign:TimePicker                  
                                   materialDesign:HintAssist.Hint="Validates"
                                   IsInvalidTextAllowed="True"
                                   Is24Hours="True" VerticalAlignment="Top"  Width="100" HorizontalAlignment="Left" Margin="0 16 0 0">
                    <materialDesign:TimePicker.Text>
                        <Binding Path="ValidatingTime" UpdateSourceTrigger="PropertyChanged">
                            <Binding.ValidationRules>
                                <domain:SimpleDateValidationRule ValidatesOnTargetUpdated="True" />
                            </Binding.ValidationRules>
                        </Binding>
                    </materialDesign:TimePicker.Text>
                </materialDesign:TimePicker>

                <TextBlock Style="{StaticResource MaterialDesignSubheadingTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">By combining the DialogHost (see MainWindow.xaml) and the Calendar and Clock controls, custom popups can be built.</TextBlock>
                <StackPanel  Orientation="Horizontal" Margin="0 32 0 0">
                    <TextBlock Text="{Binding Date, StringFormat=d}" VerticalAlignment="Center" FontSize="24" />
                    <Button Margin="8 0 0 0" Content="..." 
                    Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}"
                    materialDesign:DialogHost.DialogOpenedAttached="CalendarDialogOpenedEventHandler"
                    materialDesign:DialogHost.DialogClosingAttached="CalendarDialogClosingEventHandler">
                        <Button.CommandParameter>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
{'fraction_non_alphanumeric': 0.09510974201001156, 'fraction_numerical': 0.02011936850211783, 'mean_word_length': 2.004337767495662, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5291956', 'n_tokens_mistral': 2694, 'n_tokens_neox': 2360, 'n_words': 395}