<UserControl x:Class="Annotations.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
xmlns:dox="clr-namespace:PDFTron.SilverDox.Controls;assembly=SilverDox"
    d:DesignHeight="800" d:DesignWidth="800" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <Grid x:Name="LayoutRoot" Background="White">


                <StackPanel Orientation="Vertical">
            <dox:DocumentViewer x:Name="MyDocumentViewer" 
                             Margin="5"
                             Background="LightGray" />
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
                <TextBlock Text="Document Viewer Tool Mode:" Margin="10" Height="12" Width="175" />
                <ComboBox x:Name="ToolModeComboBox" Width="220" SelectionChanged="ToolModeComboBoxSelectionChanged" Height="21">
                    <ComboBoxItem Content="Pan/Edit" Tag="Pan"/>
                    <ComboBoxItem Content="Select Text" Tag="Select Text"/>
                    <ComboBoxItem Content="Annotate: Edit" Tag="Edit"/>
                    <ComboBoxItem Content="Annotate: Create Ellipse" Tag="Ellipse"/>
                    <ComboBoxItem Content="Annotate: Create Rectangle" Tag="Rectangle"/>
                    <ComboBoxItem Content="Annotate: Create Free Hand" Tag="Free Hand"/>
                    <ComboBoxItem Content="Annotate: Create Text Highlight" Tag="Text Highlight"/>
                    <ComboBoxItem Content="Annotate: Create Text Underline" Tag="Text Underline"/>
                    <ComboBoxItem Content="Annotate: Create Text Strikeout" Tag="Text Strikeout"/>
                    <ComboBoxItem Content="Annotate: Create Line" Tag="Line"/>
                    <ComboBoxItem Content="Annotate: Create Arrow" Tag="Arrow"/>
                    <ComboBoxItem Content="Annotate: Create Sticky" Tag="Sticky"/>
                    
                </ComboBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">


                <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                    <TextBlock Text="Annotation Controls" HorizontalAlignment="Center" FontWeight="Bold"/>
                    <StackPanel Orientation="Horizontal" Margin="0,5,0,0">

                        <TextBlock Text="Fill Color:" Margin="0,2,15,0" Width="73" />

                        <ComboBox x:Name="FillColorComboBox" Width="174" SelectionChanged="FillColorComboBoxSelectionChanged" Height="20">
                            <ComboBoxItem Tag="Red">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Red" Height="12" Width="12"/>
                                    <TextBlock Text="Red" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Orange" >
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Orange" Height="12" Width="12"/>
                                    <TextBlock Text="Orange" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Yellow">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Yellow" Height="12" Width="12"/>
                                    <TextBlock Text="Yellow" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Light Green">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="LightGreen" Height="12" Width="12"/>
                                    <TextBlock Text="Light Green" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Green">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Green" Height="12" Width="12"/>
                                    <TextBlock Text="Green" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Blue">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Blue" Height="12" Width="12"/>
                                    <TextBlock Text="Blue" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Black">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Black" Height="12" Width="12"/>
                                    <TextBlock Text="Black" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Transparent">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Transparent" Height="12" Width="12"/>
                                    <TextBlock Text="Transparent" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                        </ComboBox>
                    </StackPanel>
                    
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="Stroke Color:" Margin="0,2,15,0"/>

                        <ComboBox x:Name="StrokeColorComboBox" Width="173" SelectionChanged="StrokeColorComboBoxSelectionChanged" Height="20">
                            <ComboBoxItem Tag="Red">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Red" Height="12" Width="12"/>
                                    <TextBlock Text="Red" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Orange">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Orange" Height="12" Width="12"/>
                                    <TextBlock Text="Orange" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Yellow">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Yellow" Height="12" Width="12"/>
                                    <TextBlock Text="Yellow" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Light Green">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="LightGreen" Height="12" Width="12"/>
                                    <TextBlock Text="Light Green" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Green">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Green" Height="12" Width="12"/>
                                    <TextBlock Text="Green" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Blue">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Blue" Height="12" Width="12"/>
                                    <TextBlock Text="Blue" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Black">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Black" Height="12" Width="12"/>
                                    <TextBlock Text="Black" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="Transparent">
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Stroke="Black" Fill="Transparent" Height="12" Width="12"/>
                                    <TextBlock Text="Transparent" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                        </ComboBox>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="Stroke Thickness:" Margin="0,2,15,0"/>

                        <ComboBox x:Name="StrokeThicknessComboBox" Width="147" SelectionChanged="StrokeThicknessComboBoxSelectionChanged" Height="20">
                            <ComboBoxItem Tag="1">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="1" Margin="10,0,0,0"/>
                                    <Line Stroke="Black" Fill="Black" StrokeThickness="1" X1="0" Y1="8" X2="70" Y2="8" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="2">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="2" Margin="10,0,0,0"/>
                                    <Line Stroke="Black" Fill="Black" StrokeThickness="2" X1="0" Y1="8" X2="70" Y2="8" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="3">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="3" Margin="10,0,0,0"/>
                                    <Line Stroke="Black" Fill="Black" StrokeThickness="3" X1="0" Y1="8" X2="70" Y2="8" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="4">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="4" Margin="10,0,0,0"/>
                                    <Line Stroke="Black" Fill="Black" StrokeThickness="4" X1="0" Y1="8" X2="70" Y2="8" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                            <ComboBoxItem Tag="5">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="5" Margin="10,0,0,0"/>
                                    <Line Stroke="Black" Fill="Black" StrokeThickness="5" X1="0" Y1="8" X2="70" Y2="8" Margin="10,0,0,0"/>
                                </StackPanel>
                            </ComboBoxItem>
                        </ComboBox>
                    </StackPanel>
                    
                    <Button x:Name="Change" Content="Apply Properties To Selected Annotation(s)" Width="257" Click="Change_Click" Margin="0,10,5,0" Height="23" />
                    <Button Width="257" x:Name="ClearAnnotationsButton" Click="ClearAnnotationsButton_Click" Content="Delete All Annotations" Margin="0,10,5,0" Height="23" />
                </StackPanel>
                <StackPanel Orientation="Vertical" Height="235" Width="249">
                    <TextBlock Text="Annotation Saving &amp; Loading" HorizontalAlignment="Center" FontWeight="Bold"/>
                    <Button Width="217" x:Name="SerializeAnnotationsButton" Click="SerializeAnnotationsButton_Click" Content="Store Annotations To Disk" Margin="5" Height="23" />

                    <Button Width="217" x:Name="LoadAnnotationsButton" Click="LoadAnnotationsButton_Click" Content="Load Annotations From Disk" Margin="5" Height="23" />
                </StackPanel>
                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Height="235" Width="246">
                <TextBlock Text="Other" HorizontalAlignment="Center" FontWeight="Bold"/>

                    <Button Content="Print Document With Annotations..." Width="230" Height="23" Click="PrintDocument" Margin="5"/>

                    <Button x:Name="Load" Content="Open Local Document..." Width="230" Height="23" Click="LoadLocalDocument" Margin="5"/>
<!--<Button x:Name="Custom" Content="CUSTOM" Width="230" Height="23" Click="CustomClick" Margin="5"/>-->
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </Grid>


</UserControl>
