Browse Source

Previewer: hide "Show in default browser" button when no document available

MarcinZiabek 3 years ago
parent
commit
26193313b8

+ 1 - 0
QuestPDF.Previewer/PreviewerWindow.axaml

@@ -53,6 +53,7 @@
 			<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Vertical" VerticalAlignment="Bottom" Spacing="16" Margin="32">
 			<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Vertical" VerticalAlignment="Bottom" Spacing="16" Margin="32">
 				<Button Classes="actions"
 				<Button Classes="actions"
 				        Command="{Binding ShowPdfCommand, Mode=OneTime}"
 				        Command="{Binding ShowPdfCommand, Mode=OneTime}"
+				        IsVisible="{Binding !!Pages.Count}"
 				        ToolTip.Tip="Generates PDF file and shows it in the default browser. Useful for testing compatibility and interactive links.">
 				        ToolTip.Tip="Generates PDF file and shows it in the default browser. Useful for testing compatibility and interactive links.">
 					<Viewbox Width="24" Height="24">
 					<Viewbox Width="24" Height="24">
 						<Canvas Width="24" Height="24">
 						<Canvas Width="24" Height="24">

+ 1 - 1
QuestPDF.Previewer/QuestPDF.Previewer.csproj

@@ -4,7 +4,7 @@
         <Authors>MarcinZiabek</Authors>
         <Authors>MarcinZiabek</Authors>
         <Company>CodeFlint</Company>
         <Company>CodeFlint</Company>
         <PackageId>QuestPDF.Previewer</PackageId>
         <PackageId>QuestPDF.Previewer</PackageId>
-        <Version>2022.4.0</Version>
+        <Version>2022.4.1</Version>
         <PackAsTool>true</PackAsTool>
         <PackAsTool>true</PackAsTool>
         <ToolCommandName>questpdf-previewer</ToolCommandName>
         <ToolCommandName>questpdf-previewer</ToolCommandName>
         <PackageDescription>QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API.</PackageDescription>
         <PackageDescription>QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API.</PackageDescription>