Represents an external object that can be seamlessly rendered in a C1PrintDocument. See remarks for details.

Namespace:  C1.C1Preview
Assembly:  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.
To implement a C1PrintableGetTree() method on a class, follow these steps:
  • Add a method
    Copy CodeC#
    public Stream C1PrintableGetTree()
    to your class;
  • 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.
You will then be able to assign an instance of your class to the Object property of a RenderC1Printable object, and insert that object anywhere in a C1PrintDocument where a standard render object may occur.

Inheritance Hierarchy

System..::..Object
  C1.C1Preview..::..RenderObject
    C1.C1Preview..::..RenderArea
      C1.C1Preview..::..RenderC1Printable

See Also