Office Module (Rich Text Editor, Spreadsheet Editor, PDF Viewer)
- 2 minutes to read
The Office Module integrates the following DevExpress controls into an XAF application:
Platform | Rich Text Editor | Spreadsheet Editor | PDF Viewer (CTP) |
---|---|---|---|
Blazor | DxRichEdit | Not supported | DxPdfViewer |
WinForms | RichEditControl | SpreadsheetControl | PdfViewer |
Web Forms | ASPxRichEdit | ASPxSpreadsheet | Not supported |
Tip
Try out the Office Module in the MainDemo.NET.EFCore demo application that ships with XAF. Refer to Detail Views of the following business objects: Note (Rich Text Editor), Resume (PDF Viewer). You can find the demo in the following folder: %PUBLIC%\Documents\DevExpress Demos 25.1\Components\XAF\MainDemo.NET.EFCore.
Add the Office Module to Your Application
To enable the Office module in your application follow the steps below:
- Install NuGet packages that contain the Office module:
Navigate to the MyApplication.Blazor.Server\Startup.cs file (for Blazor) or MyApplication.Win\Startup.cs file (for WinForms) and call the AddOffice (for Blazor) / AddOffice (for WinForms) method:
using DevExpress.ExpressApp.ApplicationBuilder; using DevExpress.ExpressApp.Blazor.ApplicationBuilder; using DevExpress.Persistent.BaseImpl.EF; // ... public class Startup { // ... public void ConfigureServices(IServiceCollection services) { // ... services.AddXaf(Configuration, builder => { builder.UseApplication<YourSolutionNameBlazorApplication>(); builder.Modules // ... .AddOffice(options => { options.RichTextMailMergeDataType = typeof(RichTextMailMergeData); }) // ... }); // ... } }
XAF offers other methods to integrate the Office Module into a newly created or existing application. For more information, refer to the following topic: Register a Built-in XAF Module.
Add and Customize Office Components
Refer to the following help topics for details on how to work with the office components:
Rich Text Editor
- Use Rich Text Documents in Business Objects
- Access and Customize Rich Text Editor Controls
- Mail Merge
Spreadsheet Editor
- Use Spreadsheet Documents in Business Objects
- Access the Spreadsheet Editor Controls
- Customize the Spreadsheet Editors
PDF Viewer
Office Module Components
Modules
Platform | Module | NuGet package |
---|---|---|
Platform-agnostic | OfficeModule | DevExpress.ExpressApp.Office |
ASP.NET Core Blazor | OfficeBlazorModule | DevExpress.ExpressApp.Office.Blazor |
Windows Forms | OfficeWindowsFormsModule | DevExpress.ExpressApp.Office.Win |
ASP.NET Web Forms | OfficeAspNetModule | DevExpress.ExpressApp.Office.Web |
On Linux, the Office Module for Blazor might need extra libraries: Use Office File API on Linux - Prerequisites.
Application Model Extensions
The Office Module extends the Application Model with the following properties:
Module | Extended node | Property |
---|---|---|
OfficeModule | IModelRichTextFormatSettings.DocumentStorageFormat | |
OfficeWindowsFormsModule | ||
OfficeAspNetModule | IModelWebRichTextPropertyEditorHeightSettings.CustomHeight |