<Page
    x:Class="was.touchcopy.features.notes.NotesSettingsPage"
    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"
    mc:Ignorable="d">

    <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" >
            <StackPanel.Resources>
                <Style TargetType="ComboBox">
                    <Setter Property="Margin" Value="0,0,0,15"/>
                    <Setter Property="SelectedIndex" Value="0"/>
                </Style>
            </StackPanel.Resources>
            <TextBlock x:Uid="TextBlockNotesSettings" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,10,0,20" Text="XX Notes Settings"/>
            <TextBlock x:Uid="TextBlockFolders" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Folders" Margin="0,0,0,15" />
            <CheckBox x:Name="checkBoxAutoExpandFolders">
                <TextBlock x:Uid="TextBlockAutoExpandFolders" Style="{ThemeResource BodyTextBlockStyle}" Text="XX Automatically expand notes folders on feature load."/>
            </CheckBox>
            <TextBlock x:Uid="TextBlockSortOptions" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Sort Options" Margin="0,20,0,15" />
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                <ComboBox x:Uid="ComboBoxSortType" x:Name="comboBoxSortType" Header="XX Order notes and folders by">
                    <ComboBoxItem x:Uid="ComboBoxItemLastModified" Content="XX Last Updated" />
                    <ComboBoxItem x:Uid="ComboBoxItemName" Content="XX Name"  />
                </ComboBox>
                <Border x:Name="borderSortTypeHelp" Style="{StaticResource HelpButtonBorderStyle}"
                    Tapped="_borderSortTypeHelp_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 Notes Sort Order" 
                        Subtitle="XX This determines how your notes are listed. Listed alphabetically by name or by date last updated."/>

            <TextBlock x:Uid="TextBlockExportOptions" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Export Options" Margin="0,20,0,15"/>
            <StackPanel Orientation="Horizontal">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <ComboBox x:Uid="ComboBoxFileNameFormat" x:Name="comboBoxFileNameFormat" Header="XX Note file name format">
                        <ComboBoxItem x:Uid="ComboBoxItemTitleOnly" Content="XX Title"  />
                        <ComboBoxItem x:Uid="ComboBoxItemTitleAndDate" Content="XX Title and Date" />
                    </ComboBox>
                    <Border x:Name="borderFileNameFormatHelp" Style="{StaticResource HelpButtonBorderStyle}"
                    Tapped="_borderFileNameFormatHelp_Tapped" Margin="20,1,0,0" >
                        <FontIcon Style="{StaticResource HelpButtonFontIconStyle}"/>
                    </Border>
                </StackPanel>
                <TeachingTip x:Uid="TeachingTipFileNameFormat" x:Name="teachingTipFileNameFormat" Target="{x:Bind comboBoxFileNameFormat}" Title="XX Note File Name Format" 
                        Subtitle="XX This determines how notes will be named when copying multiple notes in a single copy."/>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="50,0,0,0">
                    <ComboBox x:Uid="ComboBoxFontSizeStyle" x:Name="comboBoxFontSizeStyle" Margin="0" Header="XX Font size">
                        <ComboBoxItem x:Uid="ComboBoxItemSmallest" Content="XX Smallest"/>
                        <ComboBoxItem x:Uid="ComboBoxItemSmall" Content="XX Small"/>
                        <ComboBoxItem x:Uid="ComboBoxItemMedium" Content="XX Medium"/>
                        <ComboBoxItem x:Uid="ComboBoxItemLarge" Content="XX Large"/>
                        <ComboBoxItem x:Uid="ComboBoxItemLargest" Content="XX Largest"/>
                    </ComboBox>
                    <Border x:Name="borderFontSizeStyle" Style="{StaticResource HelpButtonBorderStyle}" Tapped="_borderFontSizeStyle_Tapped" Margin="20,1,0,0" >
                        <FontIcon Style="{StaticResource HelpButtonFontIconStyle}"/>
                    </Border>

                </StackPanel>
                <TeachingTip x:Uid="TeachingTipFontSizeStyle" x:Name="teachingTipFontSizeStyle" Target="{x:Bind comboBoxFontSizeStyle}" Title="XX Font Size" 
        Subtitle="XX This determines the font size used when exporting notes to HTML or PDF."/>
            </StackPanel>

            <CheckBox x:Name="checkBoxIncludeNoteHeader">
                <TextBlock x:Uid="TextBlockIncludeNoteHeader" Style="{ThemeResource BodyTextBlockStyle}" Text="XX Include the note header in exported note documents."/>
            </CheckBox>

            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                <CheckBox x:Name="checkBoxLimitImageHeight">
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,-5,0,0">
                        <TextBlock x:Uid="TextBlockLimitImageHeightPrefix" Style="{ThemeResource BodyTextBlockStyle}" Text="XX Scale images to be no larger than" VerticalAlignment="Center"/>
                        <TextBox x:Name="textBoxMaximumImageHeight" Text="480" MaxLength="4" MaxWidth="80" Margin="4,0,4,0" IsEnabled="{Binding IsChecked, ElementName=checkBoxLimitImageHeight}" />
                        <TextBlock x:Uid="TextBlockLimitImageHeightSuffix" Style="{ThemeResource BodyTextBlockStyle}" Text="pixels in height." VerticalAlignment="Center"/>
                    </StackPanel>
                </CheckBox>
                <Border x:Name="borderLimitImageHeight" Style="{StaticResource HelpButtonBorderStyle}"
                    Tapped="_borderLimitImageHeightHelp_Tapped" Margin="20,1,0,0" >
                    <FontIcon Style="{StaticResource HelpButtonFontIconStyle}"/>
                </Border>
            </StackPanel>
            <TeachingTip x:Uid="TeachingTipLimitImageHeight" x:Name="teachingTipLimitImageHeight" Target="{x:Bind checkBoxLimitImageHeight}" Title="XX Limit Image Height" 
                        Subtitle="XX This determines the maximum height that images will be displayed and exported. The width will be scaled proportionally to maintain the aspect ratio."/>

            <TextBlock x:Uid="TextBlockHTMLExportOptions" Style="{ThemeResource SubtitleTextBlockStyle}" FontSize="14" Text="XX HTML Export Options" Margin="0,20,0,15"/>
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                <CheckBox x:Name="checkBoxEmbedHTMLMedia">
                    <TextBlock x:Uid="TextBlockEmbedHTMLMedia" Style="{ThemeResource BodyTextBlockStyle}" Text="XX Embed media data directly into the HTML file."/>
                </CheckBox>
                <Border x:Name="borderEmbedHTMLMediaHelp" Style="{StaticResource HelpButtonBorderStyle}"
                    Tapped="_borderEmbedHTMLMediaHelp_Tapped" Margin="20,1,0,0">
                    <FontIcon Style="{StaticResource HelpButtonFontIconStyle}"/>
                </Border>
            </StackPanel>
            <TeachingTip x:Uid="TeachingTipEmbedHTMLMedia" x:Name="teachingTipEmbedHTMLMedia" Target="{x:Bind checkBoxEmbedHTMLMedia}" Title="XX Embed HTML Media" 
                        Subtitle="XX This embeds media data directly into the HTML file as opposed to exporting each media file as a separate file linked to within the HTML document."/>
        </StackPanel>
    </Grid>
</Page>
