# C1.C1Preview.RenderC1Printable

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_C1Preview_RenderC1Printable" data-uid="C1.C1Preview.RenderC1Printable" class="text-break">RenderC1Printable Class
</h1>
  <div class="markdown level0 summary"><p>Represents an external object that can be seamlessly rendered in a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>.
See <b>remarks</b> for details.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a></div>
    <div class="level2"><a class="xref" href="C1.C1Preview.RenderArea.html">RenderArea</a></div>
    <div class="level3"><span class="xref">RenderC1Printable</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="C1.C1Preview.IStyleOwner.html">IStyleOwner</a></div>
    <div><a class="xref" href="C1.C1Preview.IDocumentLocation.html">IDocumentLocation</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Preview.html">C1.C1Preview</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.PrintDocument.4.6.2.dll</h6>
  <h5 id="C1_C1Preview_RenderC1Printable_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class RenderC1Printable : RenderArea, IStyleOwner, IDocumentLocation</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class RenderC1Printable
    Inherits RenderArea
    Implements IStyleOwner, IDocumentLocation</code></pre>
  </div>
  <h5 id="C1_C1Preview_RenderC1Printable_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>The object that this class renders is specified by the value of the <a class="xref" href="C1.C1Preview.RenderC1Printable.Object.html#C1_C1Preview_RenderC1Printable_Object">Object</a> property.
For an object to be assignable to that property, it must expose either of the following two instance methods:</p>
<ul><li><span class="term">Image C1PrintableGetImage()</span>If this method is implemented, it should return an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a>
representing the object to be rendered.</li><li><span class="term">Stream C1PrintableGetTree()</span>If this method is implemented, it should return a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>
containing a serialized <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a> representing the object to be rendered.
For instance, such stream can be created using the <a class="xref" href="C1.C1Preview.C1PrintDocument.Save.html#C1_C1Preview_C1PrintDocument_Save_System_IO_Stream_">Save(Stream)</a> method.
</li></ul>
To implement a <b>C1PrintableGetTree()</b> method on a class, follow these steps:
<ul><li>
Add a method <pre><code class="lang-csharp">public Stream C1PrintableGetTree()</code></pre> to your class;
</li><li>
In that method's body, create a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>, and render a representation of your class
into the <a class="xref" href="C1.C1Preview.C1PrintDocument.Body.html#C1_C1Preview_C1PrintDocument_Body">Body</a> of that document, using the available render objects
such as <a class="xref" href="C1.C1Preview.RenderText.html">RenderText</a>, <a class="xref" href="C1.C1Preview.RenderTable.html">RenderTable</a> and so on.
</li><li>
At the end of that method, create a new <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.memorystream">MemoryStream</a> object,
call the <a class="xref" href="C1.C1Preview.C1PrintDocument.Save.html#C1_C1Preview_C1PrintDocument_Save_System_IO_Stream_">Save(Stream)</a> method to save your document to that memory stream,
and return it.
</li></ul>
You will then be able to assign an instance of your class to the <a class="xref" href="C1.C1Preview.RenderC1Printable.Object.html#C1_C1Preview_RenderC1Printable_Object">Object</a>
property of a <a class="xref" href="C1.C1Preview.RenderC1Printable.html">RenderC1Printable</a> object, and insert that object anywhere
in a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a> where a standard render object may occur.
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable__ctor" data-uid="C1.C1Preview.RenderC1Printable.#ctor">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.-ctor.html#C1_C1Preview_RenderC1Printable__ctor">RenderC1Printable()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.RenderC1Printable.html">RenderC1Printable</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable__ctor_System_Object_" data-uid="C1.C1Preview.RenderC1Printable.#ctor(System.Object)">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.-ctor.html#C1_C1Preview_RenderC1Printable__ctor_System_Object_">RenderC1Printable(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.RenderC1Printable.html">RenderC1Printable</a> class,
and assigns the <a class="xref" href="C1.C1Preview.RenderC1Printable.Object.html#C1_C1Preview_RenderC1Printable_Object">Object</a> property.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_IgnoreObjectPageLayout" data-uid="C1.C1Preview.RenderC1Printable.IgnoreObjectPageLayout">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.IgnoreObjectPageLayout.html#C1_C1Preview_RenderC1Printable_IgnoreObjectPageLayout">IgnoreObjectPageLayout</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the page layout
specified on the document returned by the <b>Stream C1PrintableGetTree()</b> method
should be ignored.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_Object" data-uid="C1.C1Preview.RenderC1Printable.Object">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.Object.html#C1_C1Preview_RenderC1Printable_Object">Object</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the object to render.
The object must implement either a
<b>Image C1PrintableGetImage()</b> or a <b>Stream C1PrintableGetTree()</b>
method accessible via reflection.
For details, see the <b>remarks</b> section in <a class="xref" href="C1.C1Preview.RenderC1Printable.html">RenderC1Printable</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_AssignFrom_C1_C1Preview_RenderObject_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.C1Preview.RenderC1Printable.AssignFrom(C1.C1Preview.RenderObject,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean)">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.AssignFrom.html#C1_C1Preview_RenderC1Printable_AssignFrom_C1_C1Preview_RenderObject_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_">AssignFrom(RenderObject, bool, bool, bool, bool, bool, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Assigns (copies) properties from another <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a> to the current object.
Calls the base <a class="xref" href="C1.C1Preview.RenderArea.AssignFrom.html#C1_C1Preview_RenderArea_AssignFrom_C1_C1Preview_RenderObject_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_">AssignFrom(RenderObject, bool, bool, bool, bool, bool, bool)</a> method.
If <code class="paramref">source</code> is a <a class="xref" href="C1.C1Preview.RenderC1Printable.html">RenderC1Printable</a>, also copies <a class="xref" href="C1.C1Preview.RenderC1Printable.html">RenderC1Printable</a>-specific properties.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_GenerateInnerRenderObjects" data-uid="C1.C1Preview.RenderC1Printable.GenerateInnerRenderObjects">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.GenerateInnerRenderObjects.html#C1_C1Preview_RenderC1Printable_GenerateInnerRenderObjects">GenerateInnerRenderObjects()</a>
        </td>
        <td class="markdown level1 summary"><p>Forces the generation of inner render object or objects representing the
object being printed (specified by the <a class="xref" href="C1.C1Preview.RenderC1Printable.Object.html#C1_C1Preview_RenderC1Printable_Object">Object</a> property).
The generated render objects can be accessed via <a class="xref" href="C1.C1Preview.RenderObject.Children.html#C1_C1Preview_RenderObject_Children">Children</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_GetDefaultClip" data-uid="C1.C1Preview.RenderC1Printable.GetDefaultClip">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.GetDefaultClip.html#C1_C1Preview_RenderC1Printable_GetDefaultClip">GetDefaultClip()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the default value for the <a class="xref" href="C1.C1Preview.RenderObject.Clip.html#C1_C1Preview_RenderObject_Clip">Clip</a> property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_GetDefaultFlags" data-uid="C1.C1Preview.RenderC1Printable.GetDefaultFlags">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.GetDefaultFlags.html#C1_C1Preview_RenderC1Printable_GetDefaultFlags">GetDefaultFlags()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the default flags for this type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_GetImage" data-uid="C1.C1Preview.RenderC1Printable.GetImage">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.GetImage.html#C1_C1Preview_RenderC1Printable_GetImage">GetImage()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.methodinfo">MethodInfo</a> representing the &quot;C1PrintableGetImage&quot; method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_GetTree" data-uid="C1.C1Preview.RenderC1Printable.GetTree">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.GetTree.html#C1_C1Preview_RenderC1Printable_GetTree">GetTree()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.methodinfo">MethodInfo</a> representing the &quot;C1PrintableGetTree&quot; method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_GetTreeBinary" data-uid="C1.C1Preview.RenderC1Printable.GetTreeBinary">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.GetTreeBinary.html#C1_C1Preview_RenderC1Printable_GetTreeBinary">GetTreeBinary()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.methodinfo">MethodInfo</a> representing the &quot;C1PrintableGetTreeBinary&quot; method.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_ResetInnerRenderObjects" data-uid="C1.C1Preview.RenderC1Printable.ResetInnerRenderObjects">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.ResetInnerRenderObjects.html#C1_C1Preview_RenderC1Printable_ResetInnerRenderObjects">ResetInnerRenderObjects()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the inner render object or objects representing the object being printed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderC1Printable_ShouldSerializeChildren" data-uid="C1.C1Preview.RenderC1Printable.ShouldSerializeChildren">
          <a class="xref" href="C1.C1Preview.RenderC1Printable.ShouldSerializeChildren.html#C1_C1Preview_RenderC1Printable_ShouldSerializeChildren">ShouldSerializeChildren()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the <a class="xref" href="C1.C1Preview.RenderObject.Children.html#C1_C1Preview_RenderObject_Children">Children</a> property should be serialized.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
