<Page
    x:Class="was.droidtransfer.features.FeatureLoadingPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="using:System"
    xmlns:converters="using:was.droidtransfer.features.converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <converters:ValueToVisibilityConverter x:Name="ValueToVisibilityConverter" />
    </Page.Resources>
    <Grid>
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="8">
            <StackPanel.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="HorizontalAlignment" Value="Center"/>
                    <Setter Property="VerticalAlignment" Value="Center"/>
                </Style>
            </StackPanel.Resources>

            <TextBlock Style="{ThemeResource TitleTextBlockStyle}" HorizontalAlignment="Center">
                <Run x:Uid="TextBlockRunLoading" Text="XX Loading"/>
                <Run Text="{x:Bind sys:String.Format('{0}...', SelectedFeature)}"/>
            </TextBlock>
            <TextBlock Text="{x:Bind ProgressNotifier.Message, Mode=OneWay}" Visibility="{x:Bind ProgressNotifier.Message, Converter={StaticResource ValueToVisibilityConverter}, Mode=OneWay}" Style="{ThemeResource CaptionTextBlockStyle}" HorizontalAlignment="Center" Margin="0,0,0,4" />
            <ProgressRing HorizontalAlignment="Center" VerticalAlignment="Center"
                          IsIndeterminate="{x:Bind ProgressNotifier.IsIndeterminate, Mode=OneWay}"
                          Value="{x:Bind ProgressNotifier.Progress, Mode=OneWay}" Maximum="{x:Bind ProgressNotifier.MaxProgress, Mode=OneWay}" Margin="0,4,0,0" />
        </StackPanel>
    </Grid>
</Page>
