Gets the
DocumentBody object representing the body of the current document.
Namespace:
C1.C1Preview
Assembly:
C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
Examples
The following example uses the Body property to add the new text to the page body:
Copy CodeVisual Basic
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
MakeDoc1(C1PrintDocument1)
C1PrintDocument1.Generate()
End Sub
Private Sub MakeDoc1(ByVal doc As C1.C1Preview.C1PrintDocument)
doc.Style.Font = New Font("Verdana", 14)
Dim rt As C1.C1Preview.RenderText = New C1.C1Preview.RenderText("This is some text.")
doc.Body.Children.Add(rt)
End Sub |
Copy CodeC#
private void Form1_Load(object sender, EventArgs e)
{
MakeDoc1(c1PrintDocument1);
c1PrintDocument1.Generate();
}
private void MakeDoc1(C1.C1Preview.C1PrintDocument doc)
{
doc.Style.Font = new Font("Verdana", 14);
C1.C1Preview.RenderText rt = new C1.C1Preview.RenderText("This is some text.");
doc.Body.Children.Add(rt);
} |
See Also