Represents an external object that can be seamlessly rendered in a C1PrintDocument.
See remarks for details.
Namespace:
C1.C1PreviewAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
public class RenderC1Printable : RenderArea |
Visual Basic |
---|
Public Class RenderC1Printable _ Inherits RenderArea |
Remarks
The object that this class renders is specified by the value of the Object property.
For an object to be assignable to that property, it must expose either of the following two instance methods:
- Image C1PrintableGetImage()If this method is implemented, it should return an Image representing the object to be rendered.
- Stream C1PrintableGetTree()If this method is implemented, it should return a Stream containing a serialized C1PrintDocument representing the object to be rendered. For instance, such stream can be created using the Save(Stream) method.
-
Add a method Copy CodeC#to your class;
public Stream C1PrintableGetTree()
- In that method's body, create a C1PrintDocument, and render a representation of your class into the Body of that document, using the available render objects such as RenderText, RenderTable and so on.
- At the end of that method, create a new MemoryStream object, call the Save(Stream) method to save your document to that memory stream, and return it.
Inheritance Hierarchy
System..::..Object
C1.C1Preview..::..RenderObject
C1.C1Preview..::..RenderArea
C1.C1Preview..::..RenderC1Printable
C1.C1Preview..::..RenderObject
C1.C1Preview..::..RenderArea
C1.C1Preview..::..RenderC1Printable