TX Text Control .NET for Windows Forms

Landscape Property

Property|Introduced in 14.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a value indicating whether the section's page size is in landscape orientation.

Syntax

public bool Landscape { get; set; }

Examples

The following example configures the layout of the first document section by using SectionFormat.Landscape.

SectionFormat sectionFormat = textControl.Sections[1].Format;

sectionFormat.Landscape = true;
if (sectionFormat.Landscape)
{
    Console.WriteLine("Section Format: Landscape is enabled.");
}

Remarks

The property's default value is false.

The property returns its default value when the text selection contains multiple sections with mixed setting. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.