Skip to main content

ImageEditorOptions Class

Provides options for the image editor that you can use to edit the XRPictureBox control’s content in Print Preview.

Namespace: DevExpress.Xpf.Printing

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

NuGet Package: DevExpress.Wpf.Printing

Declaration

public class ImageEditorOptions

The following members return ImageEditorOptions objects:

Remarks

Use the RegisterImageEditorInfo(String, ImageEditorOptions, String) method to register an image editor that you can then use to edit the XRPictureBox control’s content in Print Preview. Pass an object of the ImageEditorOptions type as the method’s options parameter. By default, all menu items become available in the registered image editor.

Image and Signature Predefined Editor

Tip

Alternatively, you can use the RegisterEditorInfo(InplaceEditorInfoBase) method and pass an object of the ImageInplaceEditorInfo type as a parameter. In this instance, set the parameter object’s Options property to the ImageEditorOptions object.

Set the following properties of the passed ImageEditorOptions object to false to remove certain menu items from the editor’s menu:

Property Target Menu Item Menu Item Behavior
AllowLoadImage Load Image Menu Item Invokes the Open File dialog to load an image to the editor.
AllowChangeSizeOptions Size Mode and Alignment Menu Item Provides options to change the image size mode and alignment in the editor.
AllowDraw Brush Options Menu Item Provides options to set the brush size and color.
AllowClear Clear Menu Item Removes all the content the editor contains.

The following code snippet demonstrates how to use the ImageEditorOptions class to register a custom image editor.

using DevExpress.Xpf.Printing;

//...

ImageEditorOptions imageEditorOptions = new ImageEditorOptions() {
    AllowLoadImage = false,
    AllowChangeSizeOptions = false,
    AllowDraw = true,
    AllowClear = false
};
EditingFieldExtensions.Instance.RegisterImageEditorInfo("DamageDiagram", imageEditorOptions, "Damage Diagram");

RegisterImageEditor_Result

Note

The Reset Icon menu item resets the editor’s content. This item is available only when the Picture Box control’s ImageSource property is originally assigned.

You can also specify the ImageEditorOptions object’s PredefinedImages property to provide end users with a collection of predefined images.

Predefined Images

Inheritance

Object
ImageEditorOptions
See Also