<UserControl x:Class="ZoomAndPageLayout.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:PageViewSL="clr-namespace:O2S.Components.PDFView4NET.SL;assembly=O2S.Components.PDFView4NET.SL">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Border Grid.Row="0" Background="#FAFAFA">
            <StackPanel Orientation="Horizontal">
                <!--Open-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Open file" Click="OpenFile_Click">
                    <Image Source="/Resources/fileopen16.png" Width="16" Height="16"/>
                </Button>

                <!--Save-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Save file" Click="SaveFile_Click">
                    <Image Source="/Resources/filesave16.png" Width="16" Height="16"/>
                </Button>

                <!--Close-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Close file" Click="CloseFile_Click">
                    <Image Source="/Resources/fileexit16.png" Width="16" Height="16"/>
                </Button>

                <!--Separator-->
                <Line Height="20" Width="1" Margin="2" X1="0" X2="0" Y1="0" Y2="20" Stroke="Black"/>

                <!--Zoom-->
                <TextBlock Margin="2" Text="Zoom:" VerticalAlignment="Center"/>
                <ComboBox Name="ZoomCombo" Margin="2" Width="80" ItemsSource="{Binding ZoomValues, Mode=TwoWay}" SelectedItem="{Binding ElementName=PdfControl, Path=Zoom, Mode=TwoWay}"/>

                <!-- Z+ -->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Zoom in" Click="ZoomIn_Click">
                    <Image Source="/Resources/ZoomIn16.png" Width="16" Height="16"/>
                </Button>

                <!-- Z- -->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Zoom out" Click="ZoomOut_Click">
                    <Image Source="/Resources/ZoomOut16.png" Width="16" Height="16"/>
                </Button>

                <!--Dynamic zoom-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Dynamic zoom" Click="DynamicZoom_Click">
                    <Image Source="/Resources/ZoomDynamic16.png" Width="16" Height="16"/>
                </Button>

                <!--Marquee zoom-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Marquee zoom" Click="MarqueeZoom_Click">
                    <Image Source="/Resources/ZoomMarquee16.png" Width="16" Height="16"/>
                </Button>

                <!--Actual size-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Actual size" Click="ActualSize_Click">
                    <Image Source="/Resources/ZoomActualSize16.png" Width="16" Height="16"/>
                </Button>

                <!--Fit visible-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Fit visible" Click="FitVisible_Click">
                    <Image Source="/Resources/ZoomFitVisible16.png" Width="16" Height="16"/>
                </Button>

                <!--Fit width-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Fit width" Click="FitWidth_Click">
                    <Image Source="/Resources/ZoomFitWidth16.png" Width="16" Height="16"/>
                </Button>

                <!--Fit height-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Fit height" Click="FitHeight_Click">
                    <Image Source="/Resources/ZoomFitHeight16.png" Width="16" Height="16"/>
                </Button>

                <!--Sepatator-->
                <Line Height="20" Width="1" Margin="2" X1="0" X2="0" Y1="0" Y2="20" Stroke="Black"/>

                <!--Single page-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Single page" Click="SinglePage_Click">
                    <Image Source="/Resources/DisplaySinglePage16.png" Width="16" Height="16"/>
                </Button>

                <!--One column-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="One column" Click="OneColumn_Click">
                    <Image Source="/Resources/DisplayOneColumn16.png" Width="16" Height="16"/>
                </Button>

                <!--Two columns-->
                <Button Margin="2" Background="White" ToolTipService.ToolTip="Two columns" Click="TwoColumns_Click">
                    <Image Source="/Resources/DisplayTwoColumn16.png" Width="16" Height="16"/>
                </Button>
            </StackPanel>
        </Border>

        <PageViewSL:PDFPageView Grid.Row="1" Name="PdfControl" Grid.Column="0" Margin="0" BorderThickness="1" BorderBrush="Black"/>
    </Grid>
</UserControl>
