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.XtraPrinting.Preview

Assembly: DevExpress.XtraPrinting.v24.1.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.Printing

Declaration

public class ImageEditorOptions

Remarks

Use the RegisterImageEditor(String, String, ImageEditorOptions) 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

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.XtraPrinting.Preview;

//...

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

RegisterImageCollectionEditor_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