<phone:PhoneApplicationPage 
    x:Class="MemoThread.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"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:my="clr-namespace:MemoThread"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    Language="ko-kr"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded" BackKeyPress="PhoneApplicationPage_BackKeyPress">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    
    <!--LayoutRoot는 모든 페이지 내용이 배치되는 루트 표입니다.-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel에는 응용 프로그램 이름 및 페이지 제목이 포함됩니다.-->
        <StackPanel x:Name="TitlePanel" Margin="12,17,12,28">
            <TextBlock x:Name="PageTitle" Text="메모스레드" Margin="9,0,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="64" />
        </StackPanel>

        <!--ContentPanel - 여기에 추가 내용을 배치합니다.-->
        <Grid x:Name="ContentPanel" Margin="12,109,12,0" Grid.RowSpan="2">
            <ScrollViewer Name="srlThreads" Margin="0,0,0,112" Height="475" VerticalContentAlignment="Bottom" HorizontalContentAlignment="Stretch" VerticalAlignment="Bottom">
                <StackPanel Name="stkThreads" VerticalAlignment="Bottom"></StackPanel>
            </ScrollViewer>
            <toolkit:PhoneTextBox Name="txtMemo" VerticalAlignment="Bottom" VerticalScrollBarVisibility="Auto" Hint="메모 텍스트" MaxLength="64" DisplayedMaxLength="64" LengthIndicatorVisible="True" TextWrapping="Wrap" />
        </Grid>
    </Grid>
 
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="Images/appbar.edit.rest.png" Text="텍스트" x:Name="abbSave" Click="abbSave_Click" />
            <shell:ApplicationBarIconButton IconUri="Images/appbar.feature.camera.rest.png" Text="사진" x:Name="abbPhoto" Click="abbPhoto_Click" />
            <shell:ApplicationBarIconButton IconUri="Images/appbar.mic.rest.png" Text="녹음" x:Name="abbRecord" Click="abbRecord_Click" />
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="메모 전체 삭제" Click="ApplicationBarMenuItem_Click" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <shell:SystemTray.ProgressIndicator>
        <shell:ProgressIndicator IsIndeterminate="True" Text="녹음중입니다..." />
    </shell:SystemTray.ProgressIndicator>

</phone:PhoneApplicationPage>