﻿<local:LayoutAwarePage
    x:Name="pageRoot"
    x:Uid="DebuggingPage"
    x:Class="PilotsHubApp.DebuggingPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PilotsHubApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:PilotsHubApp.Controls"
    xmlns:dependencyProperties="using:PilotsHubApp.DependencyProperties"
    xmlns:converters="using:PilotsHubApp.Converters"
    xmlns:sampleData="using:PilotsHubApp.SampleData"
    xmlns:common="using:PilotsHubApp.Common"
    xmlns:styling="using:PilotsHubApp.Styling"
    NavigationCacheMode="Required"
    mc:Ignorable="d">
    
    <Page.Resources>
        <ResourceDictionary>
            <converters:NullableObjectConverter x:Key="NullableObjectConverter" />
            <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        </ResourceDictionary>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Style="{StaticResource UserStatsPageGridHeader}" Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            
            <TextBlock 
                Grid.Column="1" 
                Style="{StaticResource DebuggingPageHeader}"
                x:Uid="DebuggingPageHeader" 
                x:Name="DebuggingPageHeader" 
                Text="Insider Hub properties"/>
        </Grid>
        <Grid 
            Grid.ColumnSpan="2"
            Grid.Row="1"
            Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

            <Border Margin="30,30,30,30" BorderBrush="{ThemeResource PilotsHubBorderBrush}" BorderThickness="2">
                <StackPanel>
                    <StackPanel.Resources>
                        <ResourceDictionary>
                            <Style TargetType="StackPanel">
                                <Setter Property="Background" Value="{ThemeResource AppBarItemForegroundThemeBrush}"/>
                            </Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="Foreground" Value="{ThemeResource PilotsHubTextColorBrush}"/>
                                <Setter Property="FontWeight" Value="Normal"/>
                            </Style>
                        </ResourceDictionary>
                    </StackPanel.Resources>
                    
                    <Grid Margin="30,30,30,30">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="30"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        
                        <TextBlock Grid.Row="0" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run x:Uid="DbgPageInternalOrExternal" x:Name="DbgPageInternalOrExternal" Text="Internal or external:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run FontWeight="Bold" Text="{Binding InternalOrExternal, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>

                        <TextBlock Grid.Row="1" Style="{StaticResource DebuggingPageTextBlock}"> 
                            <Run x:Uid="DbgBuildLabString" x:Name="DbgBuildLabString" Text="Build lab string:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run FontWeight="Bold" Text="{Binding BuildLabString, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>

                        <TextBlock Grid.Row="2" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run x:Uid="DbgPageCurrentAppLocale" x:Name="DbgPageCurrentAppLocale" Text="Current app locale:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="2" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run FontWeight="Bold" Text="{Binding AppLocale, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>

                        <TextBlock Grid.Row="3" Style="{StaticResource DebuggingPageTextBlock}">
                                <Run x:Uid="DbgPageDotNetCulture" x:Name="DbgPageDotNetCulture" Text=".NET UI culture name:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="3" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                                <Run FontWeight="Bold" Text="{Binding DotNetApiCulture, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>

                        <TextBlock Grid.Row="4" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run x:Uid="DbgPageServiceUrl" x:Name="DbgPageServiceUrl" Text="Current service URL:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="4" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                            <Run FontWeight="Bold" Text="{Binding ServiceEndPoint, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>

                        <TextBlock Grid.Row="5" Style="{StaticResource DebuggingPageTextBlock}">
                                <Run x:Uid="DbgPageAppVersion" x:Name="DbgPageAppVersion" Text="App version:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="5" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                                <Run FontWeight="Bold" Text="{Binding AppVersion, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>

                        <TextBlock Grid.Row="6" Style="{StaticResource DebuggingPageTextBlock}">
                                <Run x:Uid="DbgPageNetworkStatus" x:Name="DbgPageNetworkStatus" Text="Network status:"/>
                        </TextBlock>
                        <TextBlock Grid.Row="6" Grid.Column="2" Style="{StaticResource DebuggingPageTextBlock}">
                                <Run FontWeight="Bold" Text="{Binding AppNetworkStatus, Converter={StaticResource NullableObjectConverter}}"/>
                        </TextBlock>
                        <ToggleSwitch x:ConnectionId='1' Grid.Row="8" x:Name="toggleSwitch1" Header="BiDi" OnContent="RtoL" OffContent="LtoR"                               />
                    </Grid>
                </StackPanel>
            </Border>
        </Grid>
    </Grid>
</local:LayoutAwarePage>

