Gets or sets a value indicating whether to use landscape orientation.
Changing this property swaps height and width of the page.
Namespace:
C1.C1PreviewAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[RefreshPropertiesAttribute(RefreshProperties.All)] public bool Landscape { get; set; } |
Visual Basic |
---|
<RefreshPropertiesAttribute(RefreshProperties.All)> _ Public Property Landscape As Boolean Get Set |
Examples
The following example sets the paper orientation to Landscape for the first page:
Copy CodeVisual Basic
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MakeDoc(C1PrintDocument1) C1PrintDocument1.Generate() End Sub Private Sub MakeDoc(ByVal doc As C1.C1Preview.C1PrintDocument) Dim pl As New C1.C1Preview.PageLayout() pl.PageSettings = New C1.C1Preview.C1PageSettings() pl.PageSettings.Landscape = True doc.PageLayouts.FirstPage = pl End Sub |
Copy CodeC#
private void Form1_Load(object sender, EventArgs e) { MakeDoc(c1PrintDocument1); c1PrintDocument1.Generate(); } private void MakeDoc(C1.C1Preview.C1PrintDocument doc) { C1.C1Preview.PageLayout pl = new C1.C1Preview.PageLayout(); pl.PageSettings = new C1.C1Preview.C1PageSettings(); pl.PageSettings.Landscape = true; doc.PageLayouts.FirstPage = pl; } |