<Page
    x:Class="MyDriving.UWP.Views.SettingsView"
    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 Background="{StaticResource MainBackgroundColor}">
        <ScrollViewer VerticalScrollBarVisibility="Hidden" Margin="15,0,15,0">
            <StackPanel Margin="0,16,0,0">

                <TextBlock  Text="Unit Preferences"  Style="{StaticResource SettingsLabelStyle}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                  
                    <RadioButton Name="Kilometers"  IsChecked="{Binding MetricDistance, Mode=TwoWay}" Margin="10,5,0,0" GroupName="A"  BorderBrush="Gray" >
                    Kilometers
                </RadioButton>
                <RadioButton Name="Miles" Margin="10,5,0,0" IsChecked="{Binding MetricDistance, Mode=TwoWay, Converter={StaticResource NotConverter}}" GroupName="A" Grid.Row="1">
                    Miles
                </RadioButton>

                <RadioButton Name="Liters"  IsChecked="{Binding MetricUnits, Mode=TwoWay}" Margin="10,5,0,0" GroupName="B" Grid.Column="1">
                    Liters
                </RadioButton>
                    <RadioButton Name="Gallons" Margin="10,5,0,0" IsChecked="{Binding MetricUnits, Mode=TwoWay, Converter={StaticResource NotConverter}}" GroupName="B" Grid.Column="1" Grid.Row="1">
                    Gallons
                </RadioButton>
                </Grid>

                <Border  Style="{StaticResource SettingsSeparatorLine}" />


                <TextBlock Text="About" Style="{StaticResource SettingsLabelStyle}"/>

                <Button  Content="Copyright 2016 Microsoft" Style="{StaticResource SettingsAboutButtonStyle}" />
                <Button Name="TermsOfUseButton" Content="Terms of use"  Click="TermsOfUseButton_Click" Style="{StaticResource SettingsAboutButtonStyle}" />
                <Button Name="PrivacyPolicyButton" Content="Privacy policy"   Click="PrivacyPolicyButton_Click" Style="{StaticResource SettingsAboutButtonStyle}" />
                <Button Name="OpenSourceNoticeButton" Content="Open Source Notice"   Click="OpenSourceNoticeButton_Click" Style="{StaticResource SettingsAboutButtonStyle}" />
                <Button Name="OpenSourceGitHubButton" Content="Open Source on GitHub"   Click="OpenSourceGitHubButton_Click" Style="{StaticResource SettingsAboutButtonStyle}" />

            </StackPanel>
        </ScrollViewer>
      
    </Grid>
</Page>
