IPrintable Interface
Defines methods to print different controls using the XtraPrinting Library.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Remarks
If a control implements the IPrintable interface, it can be printed via the XtraPrintingSystem using PrintableComponentLink.
IPrintable is derived from the IBasePrintable interface which defines methods that handle report creation. The IPrintable interface provides the ability to customize printing settings via the Property editor.
At design time, you can customize a control’s print settings using the Property editor. For example, in the Link Collection Editor, you can invoke it by pressing the button.
To print a control that implement the IPrintable interface, add a PrintableComponentLink to the PrintingSystem.Links collection and assign the IPrintable control to the PrintableComponentLinkBase.Component property.
Note
Some controls (like RichEditControl) will ignore the page options provided by the corresponding printing links and use their own page options, instead.
If the Property editor is available, the IPrintable.HasPropertyEditor method must return true and the IPrintable.PropertyEditorControl property must specify the Property editor form itself.
When the Property editor is activated, it provides the “OK”, “Cancel”, “Apply”, and “Help” buttons. To supply a help system for the Property editor, use the IPrintable.SupportsHelp and IPrintable.ShowHelp methods. The first method is called to determine whether or not the help system is available to the Property editor. The second invokes the help system itself.
Pressing the “Apply” or “OK” button applies the changes made to a control using the Property editor, by calling the IPrintable.AcceptChanges method. To discard the changes, press the “Cancel” button, which invokes the IPrintable.RejectChanges method.
The following image demonstrates the Property editor for the XtraTreeList component that implements the IPrintable interface.
At the beginning of document creation, the IBasePrintable.Initialize method is called. For an IPrintable control, it defines which IPrintingSystem object generates a report, and which ILink object is used to print and/or export the control.
Before creating every area within a document, the IBasePrintable.CreateArea method is called. Its parameters define the name of the created area and the IBrickGraphics object on which it is created.
For the complete list of DevExpress controls that implement the IPrintable interface, see Document Creation Approaches.