|
@@ -0,0 +1,82 @@
|
|
|
|
|
+<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
+ 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"
|
|
|
|
|
+ xmlns:previewer="clr-namespace:QuestPDF.Previewer"
|
|
|
|
|
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
|
+ x:Class="QuestPDF.Previewer.PreviewerWindow"
|
|
|
|
|
+ WindowStartupLocation="CenterScreen"
|
|
|
|
|
+ ExtendClientAreaToDecorationsHint="true"
|
|
|
|
|
+ ExtendClientAreaTitleBarHeightHint="-1"
|
|
|
|
|
+ Background="#666"
|
|
|
|
|
+ Icon="/Resources/Logo.png"
|
|
|
|
|
+ UseLayoutRounding="True"
|
|
|
|
|
+ Title="QuestPDF Document Preview">
|
|
|
|
|
+ <Panel>
|
|
|
|
|
+ <Grid>
|
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
|
+ <RowDefinition Height="32" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
+
|
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
+
|
|
|
|
|
+ <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
|
|
|
|
+ VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
|
|
|
+ TextAlignment="Center" Text="QuestPDF Previewer" FontSize="14" Foreground="#DFFF" FontWeight="Regular" IsHitTestVisible="False" />
|
|
|
|
|
+
|
|
|
|
|
+ <previewer:PreviewerControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
|
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
|
|
+ CurrentScroll="{Binding CurrentScroll, Mode=TwoWay}"
|
|
|
|
|
+ ScrollViewportSize="{Binding ScrollViewportSize, Mode=OneWayToSource}"
|
|
|
|
|
+ Pages="{Binding Pages, Mode=OneWay}" />
|
|
|
|
|
+
|
|
|
|
|
+ <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Vertical" VerticalAlignment="Bottom" Spacing="16" Margin="32" ZIndex="100">
|
|
|
|
|
+ <Button VerticalAlignment="Bottom" HorizontalAlignment="Left"
|
|
|
|
|
+ Padding="10" CornerRadius="100"
|
|
|
|
|
+ Command="{Binding ShowPdfCommand, Mode=OneTime}"
|
|
|
|
|
+ ToolTip.Tip="Generates PDF file and shows it in the default browser. Useful for testing compatibility and interactive links.">
|
|
|
|
|
+ <Viewbox Width="24" Height="24">
|
|
|
|
|
+ <Canvas Width="24" Height="24">
|
|
|
|
|
+ <Path Fill="White" Data="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H13C12.59,21.75 12.2,21.44 11.86,21.1C11.53,20.77 11.25,20.4 11,20H6V4H13V9H18V10.18C18.71,10.34 19.39,10.61 20,11V8L14,2M20.31,18.9C21.64,16.79 21,14 18.91,12.68C16.8,11.35 14,12 12.69,14.08C11.35,16.19 12,18.97 14.09,20.3C15.55,21.23 17.41,21.23 18.88,20.32L22,23.39L23.39,22L20.31,18.9M16.5,19A2.5,2.5 0 0,1 14,16.5A2.5,2.5 0 0,1 16.5,14A2.5,2.5 0 0,1 19,16.5A2.5,2.5 0 0,1 16.5,19Z" />
|
|
|
|
|
+ </Canvas>
|
|
|
|
|
+ </Viewbox>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+
|
|
|
|
|
+ <Button VerticalAlignment="Bottom" HorizontalAlignment="Left"
|
|
|
|
|
+ Padding="10" CornerRadius="100"
|
|
|
|
|
+ Command="{Binding ShowDocumentationCommand, Mode=OneTime}"
|
|
|
|
|
+ ToolTip.Tip="Opens official QuestPDF documentation">
|
|
|
|
|
+ <Viewbox Width="24" Height="24">
|
|
|
|
|
+ <Canvas Width="24" Height="24">
|
|
|
|
|
+ <Path Fill="White" Data="M19 1L14 6V17L19 12.5V1M21 5V18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5V6C10.55 4.9 8.45 4.5 6.5 4.5C4.55 4.5 2.45 4.9 1 6V20.65C1 20.9 1.25 21.15 1.5 21.15C1.6 21.15 1.65 21.1 1.75 21.1C3.1 20.45 5.05 20 6.5 20C8.45 20 10.55 20.4 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5M10 18.41C8.75 18.09 7.5 18 6.5 18C5.44 18 4.18 18.19 3 18.5V7.13C3.91 6.73 5.14 6.5 6.5 6.5C7.86 6.5 9.09 6.73 10 7.13V18.41Z" />
|
|
|
|
|
+ </Canvas>
|
|
|
|
|
+ </Viewbox>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+
|
|
|
|
|
+ <Button VerticalAlignment="Bottom" HorizontalAlignment="Left"
|
|
|
|
|
+ Padding="10" CornerRadius="100"
|
|
|
|
|
+ Command="{Binding SponsorProjectCommand, Mode=OneTime}"
|
|
|
|
|
+ ToolTip.Tip="Do you like QuestPDF? Please consider sponsoring the project. It really helps!">
|
|
|
|
|
+ <Viewbox Width="24" Height="24">
|
|
|
|
|
+ <Canvas Width="24" Height="24">
|
|
|
|
|
+ <Path Fill="White" Data="M12,21.1L10.5,22.4C3.9,16.5 0.5,13.4 0.5,9.6C0.5,8.4 0.9,7.3 1.5,6.4C1.5,6.6 1.5,6.8 1.5,7C1.5,11.7 5.4,15.2 12,21.1M13.6,17C18.3,12.7 21.5,9.9 21.6,7C21.6,5 20.1,3.5 18.1,3.5C16.5,3.5 15,4.5 14.5,5.9H12.6C12,4.5 10.5,3.5 9,3.5C7,3.5 5.5,5 5.5,7C5.5,9.9 8.6,12.7 13.4,17L13.5,17.1M18,1.5C21.1,1.5 23.5,3.9 23.5,7C23.5,10.7 20.1,13.8 13.5,19.8C6.9,13.9 3.5,10.8 3.5,7C3.5,3.9 5.9,1.5 9,1.5C10.7,1.5 12.4,2.3 13.5,3.6C14.6,2.3 16.3,1.5 18,1.5Z" />
|
|
|
|
|
+ </Canvas>
|
|
|
|
|
+ </Viewbox>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </StackPanel>
|
|
|
|
|
+
|
|
|
|
|
+ <ScrollBar Grid.Row="1" Grid.Column="1"
|
|
|
|
|
+ Orientation="Vertical"
|
|
|
|
|
+ AllowAutoHide="False"
|
|
|
|
|
+ Minimum="0" Maximum="1"
|
|
|
|
|
+ IsVisible="{Binding VerticalScrollbarVisible, Mode=OneWay}"
|
|
|
|
|
+ Value="{Binding CurrentScroll, Mode=TwoWay}"
|
|
|
|
|
+ ViewportSize="{Binding ScrollViewportSize, Mode=OneWay}"></ScrollBar>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ </Panel>
|
|
|
|
|
+</Window>
|