Skip to content

Commit aaae044

Browse files
committed
Refactors sample app and enhances tap gesture control
* Removes the feature enhancement plan, indicating completion of planned work. * Redesigns the sample application into a dedicated "PDF Experience" page. * Improves the UI and UX with modern styling and collapsible sections, integrating the .NET MAUI Community Toolkit. * Replaces the default MAUI starter page with the PDF viewer as the main content. * Adds an `EnableTapGestures` property to control whether custom tap events are raised or if native link navigation is prioritized. * Allows more explicit control over user interaction with PDF links and tap events. * Android's tap listener now correctly differentiates between custom tap events and native link handling. * iOS conditionally registers or de-registers its tap gesture recognizer based on this property. * Enhances the sample app's `LinkTapped` event handler to provide interactive handling of PDF links, including opening external URIs or navigating to internal document pages. * Removes the `BackgroundColor` bindable property from the PDF view control's public API. * Updates Android Kotlin standard library and MAUI Controls dependencies.
1 parent 094c9f7 commit aaae044

16 files changed

Lines changed: 524 additions & 586 deletions

FEATURE_ENHANCEMENT_PLAN.md

Lines changed: 0 additions & 385 deletions
This file was deleted.

samples/MauiPdfViewerSample/AppShell.xaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
xmlns:local="clr-namespace:MauiPdfViewerSample"
77
Title="MauiPdfViewerSample">
88

9+
<!-- Make PdfTestPage the app's main ShellContent -->
910
<ShellContent
10-
Title="Home"
11-
ContentTemplate="{DataTemplate local:MainPage}"
12-
Route="MainPage" />
11+
Title="PDF Viewer"
12+
ContentTemplate="{DataTemplate local:PdfTestPage}"
13+
Route="PdfTestPage" />
1314

1415
</Shell>

samples/MauiPdfViewerSample/MainPage.xaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

samples/MauiPdfViewerSample/MainPage.xaml.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

samples/MauiPdfViewerSample/MauiPdfViewerSample.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
</ItemGroup>
4545

4646
<ItemGroup>
47+
<PackageReference Include="CommunityToolkit.Maui" Version="12.3.0" />
4748
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.120" />
4849
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
4950
</ItemGroup>

samples/MauiPdfViewerSample/MauiProgram.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Microsoft.Extensions.Logging;
1+
using CommunityToolkit.Maui;
2+
using Microsoft.Extensions.Logging;
23
using MauiNativePdfView;
34

45
namespace MauiPdfViewerSample;
@@ -10,6 +11,7 @@ public static MauiApp CreateMauiApp()
1011
var builder = MauiApp.CreateBuilder();
1112
builder
1213
.UseMauiApp<App>()
14+
.UseMauiCommunityToolkit()
1315
.UseMauiNativePdfView()
1416
.ConfigureFonts(fonts =>
1517
{

0 commit comments

Comments
 (0)