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
Related API Members
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.
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 | 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.Xpf.Printing;
//...
ImageEditorOptions imageEditorOptions = new ImageEditorOptions() {
AllowLoadImage = false,
AllowChangeSizeOptions = false,
AllowDraw = true,
AllowClear = false
};
EditingFieldExtensions.Instance.RegisterImageEditorInfo("DamageDiagram", imageEditorOptions, "Damage Diagram");
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.