<UserControl
    x:Class="ControlExplorer.Controls.PdfViewer.DemoSavePDF"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CE.Samples.PdfViewer"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:c1="using:C1.Xaml"
    xmlns:c1Pdf="using:C1.Xaml.PdfViewer"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid x:Name="LayoutRoot">
        <Grid x:Name="gridViewer" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" x:Name="SavePanel" Visibility="Collapsed">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>       
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Button x:Name="btnClose" Content="X" Click="btnClose_Click" BorderThickness="0" MinWidth="30" />
                <TextBlock Text="FileName :" FontSize="15" Grid.Column="1" VerticalAlignment="Center" />
                <TextBox x:Name="txtFileName" Text="Presentation" Grid.Column="2"  VerticalAlignment="Center" Margin="5 0"/>

                <StackPanel HorizontalAlignment="Right" Margin="5,0,0,0" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Orientation="Horizontal">
                    <Button  x:Name="LocalButton" Content="Local" Click="LocalButton_Click" />
                    <Button x:Name="OneDriveButton" Margin="10,0,0,0" Content="OneDrive" Click="OneDriveButton_Click" />
                </StackPanel>
               
            </Grid>
            <Grid Grid.Row="1">
              
                <c1Pdf:C1PdfViewer x:Name="pdfViewer" ViewMode="Fitted" Visibility="Visible" Zoom="0.75" ViewportGap="1.0" SelectionBackground="#7FFF8040" />
                <TextBlock x:Name="txtLoading" Text="Loading..." VerticalAlignment="Center" HorizontalAlignment="Center" />
                <Border VerticalAlignment="Top" HorizontalAlignment="Left" 
                    Background="{StaticResource PhoneChromeBrush}"
                    CornerRadius="5" Opacity="0.8" Margin="5" Grid.Row="1" >
                    <StackPanel Orientation="Horizontal" Margin="4" >
                        <TextBlock FontSize="16" Text="{Binding ElementName=pdfViewer, Path=PageNumber}" Foreground="{StaticResource PhoneForegroundBrush}" />
                        <TextBlock FontSize="16" Text=" / " Foreground="{StaticResource PhoneForegroundBrush}" />
                        <TextBlock FontSize="16" Text="{Binding ElementName=pdfViewer, Path=PageCount}" Foreground="{StaticResource PhoneForegroundBrush}" />
                    </StackPanel>
                </Border>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
