<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:DateTimeSelector_UIATest"
    xmlns:data="using:DateTimeSelector_UIATest.Data"
    xmlns:common="using:DateTimeSelector_UIATest.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Xaml="using:C1.Xaml"
    x:Name="pageRoot"
    x:Class="DateTimeSelector_UIATest.GroupedItemsPage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Mode=Self}}"
    mc:Ignorable="d">

    <Page.Resources>
        <x:String x:Key="ChevronGlyph">&#xE26B;</x:String>
        <!--
            Collection of grouped items displayed by this page, bound to a subset
            of the complete item list because items in groups cannot be virtualized
        -->
        <CollectionViewSource
            x:Name="groupedItemsViewSource"
            Source="{Binding Groups}"
            IsSourceGrouped="true"
            ItemsPath="Items"
            d:Source="{Binding Groups, Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}"/>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <StackPanel>
        <TextBlock Name="p1" FontSize="20" ></TextBlock>
            <Button Name="btn_Set" AutomationProperties.AutomationId="btn_Set" Content="{Binding btn_Set_Content, Source={StaticResource C1DateTimeSelectorTestSampleLocalization}}" />
            <Button Name="btn_Clear" AutomationProperties.AutomationId="btn_Clear" Content="{Binding btn_Clear_Content, Source={StaticResource C1DateTimeSelectorTestSampleLocalization}}"/>
        </StackPanel>
        <Xaml:C1DateTimeSelector HorizontalAlignment="Left" Grid.Row="1"
                                 x:Name="datetimeselector" AutomationProperties.AutomationId="datetimeselector"
                                 VerticalAlignment="Top" />
    </Grid>
</Page>
