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
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.
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 | Invokes the Open File dialog to load an image to the editor. | |
AllowChangeSizeOptions | Provides options to change the image size mode and alignment in the editor. | |
AllowDraw | Provides options to set the brush size and color. | |
AllowClear | 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);
Note
The 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.