[]
        
(Showing Draft Content)

C1.C1Preview.RenderC1Printable

RenderC1Printable Class

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

Inheritance
RenderC1Printable
Namespace: C1.C1Preview
Assembly: C1.PrintDocument.8.dll
Syntax
public class RenderC1Printable : RenderArea, IStyleOwner, IDocumentLocation
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
    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.

Constructors

Name Description
RenderC1Printable()

Initializes a new instance of the RenderC1Printable class.

RenderC1Printable(object)

Initializes a new instance of the RenderC1Printable class, and assigns the Object property.

Properties

Name Description
IgnoreObjectPageLayout

Gets or sets a value indicating whether the page layout specified on the document returned by the Stream C1PrintableGetTree() method should be ignored.

Object

Gets or sets the object to render. The object must implement either a Image C1PrintableGetImage() or a Stream C1PrintableGetTree() method accessible via reflection. For details, see the remarks section in RenderC1Printable.

Methods

Name Description
AssignFrom(RenderObject, bool, bool, bool, bool, bool, bool)

Assigns (copies) properties from another RenderObject to the current object. Calls the base AssignFrom(RenderObject, bool, bool, bool, bool, bool, bool) method. If source is a RenderC1Printable, also copies RenderC1Printable-specific properties.

GenerateInnerRenderObjects()

Forces the generation of inner render object or objects representing the object being printed (specified by the Object property). The generated render objects can be accessed via Children.

GetDefaultClip()

Gets the default value for the Clip property.

GetDefaultFlags()

Gets the default flags for this type.

GetImage()

Gets a MethodInfo representing the "C1PrintableGetImage" method.

GetTree()

Gets a MethodInfo representing the "C1PrintableGetTree" method.

GetTreeBinary()

Gets a MethodInfo representing the "C1PrintableGetTreeBinary" method.

ResetInnerRenderObjects()

Removes the inner render object or objects representing the object being printed.

ShouldSerializeChildren()

Indicates whether the Children property should be serialized.