<Window x:Class="Bookmarks.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:PageViewWPF="clr-namespace:O2S.Components.PDFView4NET.WPF;assembly=O2S.Components.PDFView4NET.WPF"
    Title="PDFView4NET - Bookmarks" Height="400" Width="800" Name="TheMainWindow">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--First row-->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            
            <!--PDF file-->
            <Label Content="PDF file:"/>
            <TextBox Grid.Column="1" Margin="2" Name="FilePathTextBox" IsEnabled="False"/>
            <Button Grid.Column="2" Margin="2" Width="30" Content="..." Click="Browse_Click"/>
        </Grid>

        <Grid Grid.Row="1" Name="ElementsGrid" IsEnabled="False">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" MinWidth="220"/>
                <ColumnDefinition Width="*" MinWidth="410"/>
            </Grid.ColumnDefinitions>
            
            <!--The tree-->
            <TreeView Name="BookmarkTreeView" Margin="0,0,7,0"/>
            
            <!--Grid splitter-->
            <GridSplitter Grid.Column="0" Width="6"/>

            <Grid Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <!--First page-->
                    <Button Width="50" Height="24" Margin="4" Content="|&lt;" Click="FirstPage_Click"/>
                    <!--Previous page-->
                    <Button Width="50" Height="24" Margin="4" Content="&lt;" Click="PreviousPage_Click"/>
                    <!--Next page-->
                    <Button Width="50" Height="24" Margin="4" Content="&gt;" Click="NextPage_Click"/>
                    <!--Last page-->
                    <Button Width="50" Height="24" Margin="4" Content="&gt;|" Click="LastPage_Click"/>
               </StackPanel>

                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right">
                    <!--Zoom-->
                    <Label Margin="4" Content="Zoom:"/>
                    <ComboBox Margin="4" Width="100" ItemsSource="{Binding ZoomValues}" Text="{Binding ElementName=PdfControl, Path=Zoom}"/>
                </StackPanel>
                
                <PageViewWPF:PDFPageView Grid.Row="1" Name="PdfControl" Margin="0" BorderThickness="1" BorderBrush="Black"/>
            </Grid>
        </Grid>
    </Grid>
</Window>
