<phone:PhoneApplicationPage 
    x:Class="ProLatWPA.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="167*" />
            <ColumnDefinition Width="313*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Margin="12,17,0,28" Grid.ColumnSpan="2">
            <TextBlock x:Name="ApplicationTitle" Text="ProLat - Coordinate Conversion" Style="{StaticResource PhoneTextNormalStyle}" FontSize="28" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0" Grid.ColumnSpan="2">
            <TextBlock Height="67" HorizontalAlignment="Left" Margin="14,16,0,0" Name="textInput" Text="A: LAT_LONG LAT-LONG WGS84 METERS" VerticalAlignment="Top" Width="300" TextWrapping="Wrap" />
            <Button Content="Change" Height="74" HorizontalAlignment="Right" Margin="0,9,6,0" Name="buttonIn" VerticalAlignment="Top" Width="143" Click="buttonIn_Click" />
            <TextBox Height="76" HorizontalAlignment="Right" Margin="0,73,6,0" Name="editInX" Text="92 30.54 W" VerticalAlignment="Top" Width="358" TextChanged="editInX_TextChanged" />
            <TextBlock Height="57" HorizontalAlignment="Left" Margin="18,83,0,0" Name="textInX" Text="lon_x:" VerticalAlignment="Top" Width="68" />
            <TextBox Height="76" HorizontalAlignment="Left" Margin="92,134,0,0" Name="editInY" Text="" VerticalAlignment="Top" Width="358" />
            <TextBlock Height="57" HorizontalAlignment="Left" Margin="18,144,0,0" Name="textInY" Text="lat_y:" VerticalAlignment="Top" Width="68" />
            <TextBox Height="76" HorizontalAlignment="Left" Margin="92,195,0,0" Name="editInZ" Text="" VerticalAlignment="Top" Width="358" />
            <TextBlock Height="57" HorizontalAlignment="Left" Margin="18,205,0,0" Name="textInZ" Text="hgt_z:" VerticalAlignment="Top" Width="68" />
            <Button Content="Convert A to B" Height="86" HorizontalAlignment="Left" Margin="18,268,0,0" Name="buttonAtoB" VerticalAlignment="Top" Width="213" Click="buttonAtoB_Click" FontSize="24" />
            <TextBlock Height="67" HorizontalAlignment="Left" Margin="14,355,0,0" Name="textOutput" Text="B: UTM UTM-17N WGS84 METERS" VerticalAlignment="Top" Width="300" TextWrapping="Wrap" />
            <Button Content="Change" Height="74" HorizontalAlignment="Right" Margin="0,348,6,0" Name="buttonOut" VerticalAlignment="Top" Width="143" Click="buttonOut_Click" />
            <TextBlock Height="57" HorizontalAlignment="Left" Margin="18,426,0,0" Name="textBlock1" Text="lon_x:" VerticalAlignment="Top" Width="68" />
            <TextBlock Height="57" HorizontalAlignment="Left" Margin="18,487,0,0" Name="textBlock2" Text="lat_y:" VerticalAlignment="Top" Width="68" />
            <TextBlock Height="57" HorizontalAlignment="Left" Margin="18,548,0,0" Name="textBlock3" Text="hgt_z:" VerticalAlignment="Top" Width="68" />
            <Button Content="Convert B to A" Height="86" HorizontalAlignment="Right" Margin="0,268,6,0" Name="buttonBtoA" VerticalAlignment="Top" Width="213" Click="buttonBtoA_Click" FontSize="24" />
            <TextBox Height="76" HorizontalAlignment="Right" Margin="0,0,6,202" Name="editOutX" Text="" VerticalAlignment="Bottom" Width="358" />
            <TextBox Height="76" HorizontalAlignment="Left" Margin="92,468,0,0" Name="editOutY" Text="" VerticalAlignment="Top" Width="358" />
            <TextBox Height="76" HorizontalAlignment="Left" Margin="92,529,0,0" Name="editOutZ" Text="" VerticalAlignment="Top" Width="358" />
            <Button Content="Help" Height="74" HorizontalAlignment="Right" Margin="0,605,6,0" Name="buttonHelp" VerticalAlignment="Top" Width="143" Click="buttonHelp_Click" />
        </Grid>
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="Black" Offset="0.983" />
                <GradientStop Color="#FF0046B4" Offset="0" />
            </LinearGradientBrush>
        </Grid.Background>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>