EditingFieldExtensions.RegisterEditorInfo(InplaceEditorInfoBase) Method
Registers a custom editor to be used to change control content in Print Preview.
Namespace: DevExpress.Xpf.Printing
Assembly: DevExpress.Xpf.Printing.v25.1.dll
NuGet Package: DevExpress.Wpf.Printing
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| editorInfo | InplaceEditorInfoBase | Provides information about a custom editor. |
Returns
| Type | Description |
|---|---|
| Boolean | true, if an editor has been successfully registered; otherwise, false. |
Remarks
Use this method to register an image editor with a collection of predefined images in the application.
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using DevExpress.Xpf.Printing;
//...
List<Image> images = new List<Image>();
foreach (var file in Directory.GetFiles("../../Flags/", "*.png")) {
Image img = Image.FromFile(file);
if (img != null) {
images.Add(img);
}
}
ImageCollectionEditorInfo editorInfo = new ImageCollectionEditorInfo("Nationality", images, true, true, "Nationality");
EditingFieldExtensions.Instance.RegisterEditorInfo(editorInfo);
To learn how to use custom controls to edit reports in Print Preview, view the following example online: How to use custom controls for editing report content in Print Preview.
See Also