<Page
    x:Class="was.droidtransfer.features.settings.SettingsUpdatePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:was.droidtransfer.features.settings"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DataContext="{d:DesignInstance local:SettingsUpdatePage}">
    <Grid>
        <StackPanel Padding="20,10">
            <TextBlock x:Uid="UpdateSettings" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,10,0,20" Text="XX Updates"/>
            <TextBlock x:Uid="TextBlockUpdateStartupSettings" Style="{ThemeResource SubtitleTextBlockStyle}" Text="XX Start-up Settings" Margin="0,0,0,15"/>
            <CheckBox x:Uid="CheckBoxCheckUpdatesOnStart" x:Name="checkBoxCheckUpdates" Content="XX Automatically check for updates on start-up." Margin="0,0,0,0"/>
            <Grid Margin="0,40,0,15">
                <!-- Checking -->
                <Grid x:Name="gridChecking" Visibility="Visible">
                    <StackPanel >
                        <TextBlock x:Uid="TextBlockCheckingForUpdates" Text="XX Checking for Updates..." FontWeight="SemiBold" FontSize="14"/>
                        <ProgressBar IsIndeterminate="True" Height="16" Margin="0,10,0,0"/>
                    </StackPanel>
                </Grid>

                <!-- No Updates Available -->
                <Grid x:Name="gridNoUpdates" Visibility="Collapsed">
                    <StackPanel>
                        <TextBlock x:Uid="TextBlockNoUpdatesAvailable" Text="XX No updates currently available." Style="{ThemeResource SubtitleTextBlockStyle}" />
                        <TextBlock x:Name="textBlockLastChecked" Style="{ThemeResource CaptionTextBlockStyle}" />
                    </StackPanel>
                </Grid>

                <!-- Updates Available -->
                <Grid x:Name="gridUpdatesAvailable" Visibility="Collapsed" Margin="0,0,0,0" Padding="10">
                    <Grid.Resources>
                        <Style x:Key="texBlockStyle" TargetType="TextBlock">
                            <Setter Property="FontSize" Value="14"/>
                            <Setter Property="Margin" Value="0,0,0,7"/>
                        </Style>
                    </Grid.Resources>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal"  Background="{ThemeResource AppBarBackgroundThemeBrush}">
                        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xF133;" FontSize="36" VerticalAlignment="Top"/>
                        <StackPanel Margin="7,0,0,0">
                            <TextBlock x:Uid="TextBlockAnUpdateIsAvailable" Text="XX An update is available." Style="{ThemeResource SubtitleTextBlockStyle}" FontWeight="SemiBold" Margin="12,4,0,7"/>
                            <HyperlinkButton x:Uid="HyperlinkButtonDownloadUpdate" Content="XX Click here to download this update" NavigateUri="{Binding UpdateUrl, Mode=OneWay}"/>
                        </StackPanel>
                    </StackPanel>
                    <WebView2 x:Name="webViewReleaseNotes" Grid.Row="1" Margin="-18,10,0,0" MinHeight="300" Visibility="Collapsed"  />
                </Grid>
            </Grid>
        </StackPanel>
    </Grid>
</Page>
