TX Text Control .NET for WPF

SectionFormatDialog Method

Method|Introduced in 16.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Invokes the built-in tabbed dialog box for setting section attributes. These are page settings such as margins and size, all settings concerning headers and footers, page columns and page borders.

Syntax

SectionFormatDialog()

Opens the dialog box showing the last opened tab.

public DialogResult SectionFormatDialog();

SectionFormatDialog(int)

Opens the dialog box showing the specified tab.

public DialogResult SectionFormatDialog(int activeTab);
ParameterDescription
activeTab

Specifies the index of the tab, zero-based, that is displayed when the tabbed dialog box is opened. The following values are possible:

ResultMeaning
0The dialog box shows the tab for setting page margins, page size and orientation.
1The dialog box shows the tab for specifying headers and footers.
2The dialog box shows the tab for setting the number of page columns and its attributes.
3The dialog box shows the tab for specifying page borders.

Return Value

If the dialog is left with the Cancel button, the return value is DialogResult.Cancel. Otherwise, it is DialogResult.OK.

Examples

The following example opens the section format dialog for the text control.

var result = textControl.SectionFormatDialog(10);
Console.WriteLine($"Section Format Dialog result: {result}");