<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.NETCore"
    Title="PDFView4NET.WPF - Zoom and Page Layout Demo" Height="750" Width="1000" Loaded="Window_Loaded">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <ToolBar Grid.Row="0">
            <!--Open-->
            <Button ToolTip="Open file" Click="OpenFile_Click">
                <Image Source="/fileopen16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Save-->
            <Button ToolTip="Save file" Click="SaveFile_Click">
                <Image Source="/filesave16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Close-->
            <Button ToolTip="Close file" Click="CloseFile_Click">
                <Image Source="/fileexit16.png" 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="/ZoomIn16.png" Width="16" Height="16"/>
            </Button>
            
            <!-- Z- -->
            <Button ToolTip="Zoom out" Click="ZoomOut_Click">
                <Image Source="/ZoomOut16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Dynamic zoom-->
            <Button ToolTip="Dynamic zoom" Click="DynamicZoom_Click">
                <Image Source="/ZoomDynamic16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Marquee zoom-->
            <Button ToolTip="Marquee zoom" Click="MarqueeZoom_Click">
                <Image Source="/ZoomMarquee16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Actual size-->
            <Button ToolTip="Actual size" Click="ActualSize_Click">
                <Image Source="/ZoomActualSize16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Fit visible-->
            <Button ToolTip="Fit visible" Click="FitVisible_Click">
                <Image Source="/ZoomFitVisible16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Fit width-->
            <Button ToolTip="Fit width" Click="FitWidth_Click">
                <Image Source="/ZoomFitWidth16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Fit height-->
            <Button ToolTip="Fit height" Click="FitHeight_Click">
                <Image Source="/ZoomFitHeight16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Sepatator-->
            <Separator/>
            
            <!--Single page-->
            <Button ToolTip="Single page" Click="SinglePage_Click">
                <Image Source="/DisplaySinglePage16.png" Width="16" Height="16"/>
            </Button>
            
            <!--One column-->
            <Button ToolTip="One column" Click="OneColumn_Click">
                <Image Source="/DisplayOneColumn16.png" Width="16" Height="16"/>
            </Button>
            
            <!--Two columns-->
            <Button ToolTip="Two columns" Click="TwoColumns_Click">
                <Image Source="/DisplayTwoColumn16.png" Width="16" Height="16"/>
            </Button>
        </ToolBar>
        
        <PageViewWPF:PDFPageView Grid.Row="1" Name="PdfControl" Grid.Column="0" Margin="0" BorderThickness="1" BorderBrush="Black"/>
    </Grid>
</Window>
