syncfusion-wpf-pdf-viewer
Syncfusion WPF PDFViewer – UI Sample Generator
Generate C# Code for the User's Project (default)
Trigger keywords: "how to", "code sample", "show me", "example", "snippet", "integrate", "wpf PdfViewer", "create sample".
Purpose: Generate clean, ready-to-use C# and XAML code snippets that users can directly insert into their WPF applications when working with the Syncfusion WPF PdfViewer control.
Workflow:
-
Build the C# code using snippets provided in the
references/*.mdfiles. -
Before generating the sample, ask the user whether the code should be inserted into an existing XAML file in their WPF project or created as a new WPF project application.
-
If the user chooses to create a new WPF project, ask them which target framework they want to use:
- .NET Framework (e.g. 4.6, 4.7, 4.8) — uses
Syncfusion.PdfViewer.WPFand targets classic .NET Framework. - .NET Core / .NET (e.g., .NET 8, .NET 10) — uses
Syncfusion.PdfViewer.WPFwith<TargetFramework>net8.0-windows</TargetFramework>(or the selected version). - Based on the user's choice, generate the
.csprojfile with the correct<TargetFramework>value, and tailor any framework-specific code (e.g., namespace imports, NuGet package versions, startup code) accordingly.
- .NET Framework (e.g. 4.6, 4.7, 4.8) — uses
-
XAML generation rules — MANDATORY: analyze the reference files BEFORE writing any XAML:
⚠️ STRICT RULE — NO EXCEPTIONS: Open and read the relevant
references/*.mdfile(s) for the requested feature before producing any XAML.
More from syncfusion/pdf-viewer-sdk-skills
syncfusion-maui-pdf-viewer
Implements Syncfusion .NET MAUI SfPdfViewer for cross-platform PDF viewing, navigation, annotations, form filling/validation, text search/selection, e-signatures, redaction, printing, and toolbar/UI customization. Use when working with PDF viewer setup, document annotations, form fields, or signature workflows in MAUI apps.
38syncfusion-react-pdf-viewer
Implements the Syncfusion React PDF Viewer (PdfViewerComponent) for embedding, configuring, and loading PDF documents. Use this when rendering PDFs in a React application, embedding viewer controls, or generating TSX/HTML code for PDF display and interaction.
29syncfusion-blazor-pdf-viewer
Implements Syncfusion Blazor PDF Viewer (SfPdfViewer) for viewing and editing PDF documents in Blazor applications. Use this when working with PDF rendering, annotation, text search, form filling, or document navigation in Blazor.
25syncfusion-aspnetcore-pdf-viewer
Implements the Syncfusion ASP.NET Core PDFViewer for embedding, configuring, and loading PDF documents. Use this when rendering PDFs in ASP.NET Core applications, embedding viewer controls, or generating Razor page (.cshtml) code for PDF display and interaction.
21syncfusion-winforms-pdf-viewer
Create WinForms applications featuring the Syncfusion WinForms PDF Viewer, customized to meet specific user requirements. It supports essential PDF operations such as loading, saving, printing, text search, text extraction, and bookmark or hyperlink navigation. Additional capabilities include zooming, interaction modes, localization, theming, rendering engine selection, and robust error handling, enabling the creation of tailored and fully functional PDF viewing solutions.
18syncfusion-flutter-pdf-viewer
Create sample code using Syncfusion Flutter SfPdfViewer. Generate Dart/Flutter code for embedding, configuring, and loading PDF documents.
18