<Window x:Class="ZoomAndPageLayout.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.WPF - Zoom and Page Layout Demo" Height="530" Width="750">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <ToolBar Grid.Row="0">
            <!--Open-->
            <Button ToolTip="Open file" Click="OpenFile_Click">
                <Image Source="/Resources/fileopen16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Save-->
            <Button ToolTip="Save file" Click="SaveFile_Click">
                <Image Source="/Resources/filesave16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Close-->
            <Button ToolTip="Close file" Click="CloseFile_Click">
                <Image Source="/Resources/fileexit16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Separator-->
            <Separator/>
            
            <!--Zoom-->
            <Label Margin="0,-2,0,-2" Content="Zoom:"/>
            <ComboBox Margin="0,-2,0,-2" Width="80" ItemsSource="{Binding ZoomValues}" Text="{Binding ElementName=PdfControl, Path=Zoom}"/>
            
            <!-- Z+ -->
            <Button ToolTip="Zoom in" Click="ZoomIn_Click">
                <Image Source="/Resources/ZoomIn16.ico" Width="16" Height="16"/>
            </Button>
            
            <!-- Z- -->
            <Button ToolTip="Zoom out" Click="ZoomOut_Click">
                <Image Source="/Resources/ZoomOut16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Dynamic zoom-->
            <Button ToolTip="Dynamic zoom" Click="DynamicZoom_Click">
                <Image Source="/Resources/ZoomDynamic16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Marquee zoom-->
            <Button ToolTip="Marquee zoom" Click="MarqueeZoom_Click">
                <Image Source="/Resources/ZoomMarquee16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Actual size-->
            <Button ToolTip="Actual size" Click="ActualSize_Click">
                <Image Source="/Resources/ZoomActualSize16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Fit visible-->
            <Button ToolTip="Fit visible" Click="FitVisible_Click">
                <Image Source="/Resources/ZoomFitVisible16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Fit width-->
            <Button ToolTip="Fit width" Click="FitWidth_Click">
                <Image Source="/Resources/ZoomFitWidth16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Fit height-->
            <Button ToolTip="Fit height" Click="FitHeight_Click">
                <Image Source="/Resources/ZoomFitHeight16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Sepatator-->
            <Separator/>
            
            <!--Single page-->
            <Button ToolTip="Single page" Click="SinglePage_Click">
                <Image Source="/Resources/DisplaySinglePage16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--One column-->
            <Button ToolTip="One column" Click="OneColumn_Click">
                <Image Source="/Resources/DisplayOneColumn16.ico" Width="16" Height="16"/>
            </Button>
            
            <!--Two columns-->
            <Button ToolTip="Two columns" Click="TwoColumns_Click">
                <Image Source="/Resources/DisplayTwoColumn16.ico" Width="16" Height="16"/>
            </Button>
        </ToolBar>
        
        <PageViewWPF:PDFPageView Grid.Row="1" Name="PdfControl" Grid.Column="0" Margin="0" BorderThickness="1" BorderBrush="Black"/>
    </Grid>
</Window>
