<Page
    x:Class="was.touchcopy.features.calllogs.CallLogsSettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="using:was.touchcopy.features.calllogs"
    mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=local:CallLogsSettingsPage}">

    <Grid>
        <Grid.Resources>
            <Style x:Key="HelpButtonBorderStyle" TargetType="Border">
                <Setter Property="CornerRadius" Value="12"/>
                <Setter Property="BorderThickness" Value="2"/>
                <Setter Property="BorderBrush" Value="{StaticResource SystemAccentColor}"/>
                <Setter Property="Padding" Value="3"/>
                <Setter Property="VerticalAlignment" Value="Top"/>
            </Style>
            <Style x:Key="HelpButtonFontIconStyle" TargetType="FontIcon">
                <Setter Property="FontSize" Value="14"/>
                <Setter Property="FontWeight" Value="SemiBold"/>
                <Setter Property="Foreground" Value="{ThemeResource SystemAccentColor}"/>
                <Setter Property="Glyph" Value="&#xE897;"/>
            </Style>
        </Grid.Resources>
        <StackPanel Padding="20,10">
            <TextBlock x:Uid="TextBlockCallLogsSettings" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,10,0,20" Text="XX Call Logs Settings"/>
            <TextBlock x:Uid="TextBlockSortOptions" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Sort Options" Margin="0,0,0,15"/>
            <StackPanel Orientation="Horizontal" Spacing="48">
                <Grid>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <ComboBox x:Uid="ComboBoxSortType" x:Name="comboBoxSortType" Header="XX Order call logs by">
                            <ComboBoxItem x:Uid="ComboBoxItemName" Content="XX Name"  />
                            <ComboBoxItem x:Uid="ComboBoxItemLastUpdated" Content="XX Last Updated" />
                        </ComboBox>
                        <Border x:Name="borderSortType" Style="{StaticResource HelpButtonBorderStyle}"
                        Tapped="_borderSortType_Tapped" Margin="20,1,0,0" >
                            <FontIcon Style="{StaticResource HelpButtonFontIconStyle}"/>
                        </Border>
                    </StackPanel>
                    <TeachingTip x:Uid="TeachingTipSortType" x:Name="teachingTipSortType" Target="{x:Bind comboBoxSortType}" Title="XX Call Logs Sort Order" 
                         Subtitle="XX This determines how your call logs are listed. Listed alphabetically by first name or by last call date."/>
                </Grid>
                <Grid>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <ComboBox x:Uid="ComboBoxSortEntries" x:Name="comboBoxSortEntries" Header="XX Sort Entries by">
                            <ComboBoxItem x:Uid="ComboBoxItemOldestToNewest" Content="XX Oldest to Newest" />
                            <ComboBoxItem x:Uid="ComboBoxItemNewestToOldest" Content="XX Newest to Oldest" />
                        </ComboBox>
                        <Border x:Name="borderSortEntries" Style="{StaticResource HelpButtonBorderStyle}" Tapped="_borderSortEntries_Tapped" Margin="20,1,0,0">
                            <FontIcon Style="{StaticResource HelpButtonFontIconStyle}" />
                        </Border>
                    </StackPanel>
                    <TeachingTip x:Uid="TeachingTipSortEntries" x:Name="teachingTipSortEntries" Target="{x:Bind comboBoxSortEntries}" Title="XX Entries Sort Order" 
             Subtitle="XX This determines how the entries within a call log are ordered. Either oldest to newest or newest to oldest."/>
                </Grid>
            </StackPanel>
            <TextBlock x:Uid="TextBlockLimitOptions" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Limit Options" Margin="0,20,0,15" />
            <CheckBox x:Name="checkBoxLimitCallLogs">
                <TextBlock x:Uid="TextBlockLimitCallLogs" Style="{ThemeResource BodyTextBlockStyle}" Text="XX Limit the amount of call logs displayed in the preview." />
            </CheckBox>
            <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
                <TextBlock x:Name="textBlockLimitCallLogsPrefix" VerticalAlignment="Center" />
                <TextBox x:Name="textBoxLimitCallLogs" IsEnabled="{Binding IsChecked, ElementName=checkBoxLimitCallLogs}" Text="30" PlaceholderText="30" MaxLength="3" Margin="6,0,6,0" />
                <TextBlock x:Name="textBlockLimitCallLogsSuffix" VerticalAlignment="Center" />
            </StackPanel>

            <TextBlock x:Uid="TextBlockExportOptions" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Export Options" Margin="0,20,0,15"/>
            <CheckBox x:Name="checkBoxMergeCallLogs">
                <TextBlock x:Uid="TextBlockMergeCallLogs" Style="{ThemeResource BodyTextBlockStyle}" Text="XX Merge selected call logs into a single call log."/>
            </CheckBox>
        </StackPanel>
    </Grid>
</Page>
