For v18.2 we are delivering some great features to support freehand drawing and image uploads in the Print Preview - for signatures and other purposes - as well as the SVG image format. All platforms supported by our Reporting system benefit from these updates.
All new functionality is supported by the XRPictureBox
report control. Its EditOptions
property is populated with an instance of the new type ImageEditOptions
, and this is where you find the property EditorName
that is explained in more detail below.
Freehand Drawing in the Print Preview
To allow users to draw directly into a report in the Print Preview, set the property ImageEditOptions.EditorName
to Signature
. When the editor is activated, the user can choose colors and brush sizes in the flyout panel:
Image Upload in the Print Preview
Image uploads are allowed when ImageEditOptions.EditorName
is set to Image
. You can then choose sizing mode and image alignment in the flyout panel at runtime (these correspond to the design-time properties Sizing
and ImageAlignment
).
The Picture Box allows image uploads and freehand drawing simultaneously when ImageEditOptions.EditorName
is set to ImageAndSignature
.
All image editors include a Remove button. This button resets the editor value to the image provided in the InitialImage
property.
Predefined Image Lists
The final new editor type is the image list. Helper methods are available to register image editors with collections of predefined images. For instance, this code registers an editor for national flags in a WinForms application:
var images = new List<Image>(); foreach (var file in Directory.GetFiles("../../Flags/", "*.png")) { var img = Image.FromFile(file); if (img != null) images.Add(img); } EditingFieldExtensionsWin.Instance.RegisterImageCollectionEditorInfo( "Nationality", "Nationality", images);
With the registration in place, set ImageEditOptions.EditorName
to the name of the editor (Nationality
in this example). When an end user clicks the Picture Box in the Print Preview, they can choose a predefined image from the list:
SVG Image Support
Using the new property XRPictureBox.ImageSource
, the control now supports SVG format images. The implementation currently doesn’t support images with gradients or text elements. We hope to extend the feature set in future versions. Please let us know your priorities.
SVG images are preserved when a report is exported to a PDF file. Other export formats include a metafile or a bitmap.
Your feedback is valuable
We would be very grateful if you could submit your responses to the short survey below. If you have any other thoughts or you would like to describe specific scenarios to us, please feel free to leave a comment below or to open a Support Center issue.