feat(PdfReader): add ShowToolbar parameter (#7203)

This commit is contained in:
Argo Zhang
2025-11-28 09:01:27 +08:00
committed by GitHub
parent 3d63087123
commit 228867663b
2 changed files with 9 additions and 1 deletions

View File

@@ -8,6 +8,12 @@
<DemoBlock Title="@Localizer["PdfReaderNormalText"]" Introduction="@Localizer["PdfReaderNormalIntro"]" Name="Normal">
<section ignore class="row form-inline g-3" style="--bb-input-group-label-width: 176px;">
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel>ShowToolbar</BootstrapInputGroupLabel>
<Switch @bind-Value="_showToolbar"></Switch>
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel>ShowDownload</BootstrapInputGroupLabel>
@@ -34,6 +40,7 @@
</div>
</section>
<PdfReader Url="@_url" EnableThumbnails="_enableThumbnails"
ShowTwoPagesOneView="_showTwoPagesOneView" ShowDownload="_showDownload" ShowPrint="_showPrint"
ShowTwoPagesOneView="_showTwoPagesOneView" ShowDownload="_showDownload"
ShowToolbar="_showToolbar" ShowPrint="_showPrint"
ViewHeight="600px" OnDownloadAsync="OnDownloadAsync"></PdfReader>
</DemoBlock>

View File

@@ -20,6 +20,7 @@ public partial class PdfReaders
private bool _showPrint = true;
private bool _enableThumbnails = true;
private bool _showDownload = true;
private bool _showToolbar = true;
private string _url = "./samples/sample.pdf";
private async Task OnDownloadAsync()