# TextControl.SectionFormatDialog Method

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 16.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.SectionFormatDialog Method
- **666 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/sectionformatdialog-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/sectionformatdialog-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/sectionformatdialog-method/llms-full.txt

---

### 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.

```csharp
public DialogResult SectionFormatDialog();
```

```vbnet
Public Function SectionFormatDialog() As DialogResult
```

#### SectionFormatDialog(int)

Opens the dialog box showing the specified tab.

```csharp
public DialogResult SectionFormatDialog(int activeTab);
```

```vbnet
Public Function SectionFormatDialog(activeTab As Integer) As DialogResult
```

| Parameter | Description |
|---|---|
| activeTab | Specifies the index of the tab, zero-based, that is displayed when the tabbed dialog box is opened. The following values are possible:  \| Result \| Meaning \| \| 0 \| The dialog box shows the tab for setting page margins, page size and orientation. \| \| 1 \| The dialog box shows the tab for specifying headers and footers. \| \| 2 \| The dialog box shows the tab for setting the number of page columns and its attributes. \| \| 3 \| The 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.

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

```vbnet
Dim result = textControl.SectionFormatDialog(10)
Console.WriteLine($"Section Format Dialog result: {result}")
```

---

## Nearby

- **Previous:** [TextControl.SectionChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/sectionchanged-event/llms-full.txt)
- **Next:** [TextControl.Sections Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/sections-property/llms-full.txt)
