Back to Devexpress

ImageCollectionEditorInfo Class

wpf-devexpress-dot-xpf-dot-printing-1f7a64f9.md

latest3.5 KB
Original Source

ImageCollectionEditorInfo Class

Provides information about an image collection editor that is used to edit image content in Print Preview.

Namespace : DevExpress.Xpf.Printing

Assembly : DevExpress.Xpf.Printing.v25.2.dll

NuGet Package : DevExpress.Wpf.Printing

Declaration

csharp
public class ImageCollectionEditorInfo :
    ImageInplaceEditorInfo
vb
Public Class ImageCollectionEditorInfo
    Inherits ImageInplaceEditorInfo

Remarks

The custom image editor provides end-users with a collection of named images.

The following properties allow you to set up the image collection editor:

  • ImageCollection - provides access to the collection of predefined named images.
  • SearchEnabled - specifies whether to allow end-users to use incremental search in the image collection.
  • SizeOptionsEnabled - specifies whether to allow end-users to set up the image’s size and alignment options in the image collection editor.
  • ShowCaption - indicates whether to display item captions in the image collection editor.

Use the EditingFieldExtensions.RegisterEditorInfo(InplaceEditorInfoBase) method to register an image editor in the application.

csharp
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);
vb
Option Infer On

Imports System.Collections.Generic
Imports System.Drawing
Imports System.IO
Imports DevExpress.Xpf.Printing
'...
Private images As New List(Of Image)()
For Each file In Directory.GetFiles("../../Flags/", "*.png")
    Dim img As Image = Image.FromFile(file)
    If img IsNot Nothing Then
        images.Add(img)
    End If
Next file
Private editorInfo As New ImageCollectionEditorInfo("Nationality", images, True, True, "Nationality")
EditingFieldExtensions.Instance.RegisterEditorInfo(editorInfo)

Inheritance

Object InplaceEditorInfoBase ImageInplaceEditorInfo ImageCollectionEditorInfo

See Also

ImageCollectionEditorInfo Members

DevExpress.Xpf.Printing Namespace