officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-sectionmargins.md
Specifies the gutter margin position for a specific section.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
GutterPosition GutterPosition { get; set; }
Property GutterPosition As GutterPosition
| Type | Description |
|---|---|
| GutterPosition |
An enumeration value that indicates gutter margin position.
|
Available values:
| Name | Description |
|---|---|
| Left |
A Gutter margin is added to the page left.
| | Right |
A Gutter margin is added to the page right.
|
Use the Document.GutterAtTop property to position a gutter margin at the page top. This property specifies gutter margin position for an entire document.
The following code sample adds a left gutter to the first document section:
using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
using DevExpress.Office.Utils;
using (var wordProcessor = new RichEditDocumentServer()) {
wordProcessor.LoadDocument(@"Documents//Alice.docx");
Document document = wordProcessor.Document;
Section firstSection = wordProcessor.Document.Sections[0];
var pageMargins = firstSection.Margins;
pageMargins.GutterPosition = GutterPosition.Left;
pageMargins.Gutter = Units.InchesToDocumentsF(1);
wordProcessor.SaveDocument("Alice_formatted.docx", DocumentFormat.Docx);
}
Imports DevExpress.XtraRichEdit
Imports DevExpress.XtraRichEdit.API.Native
Imports DevExpress.Office.Utils
Using wordProcessor = New RichEditDocumentServer()
wordProcessor.LoadDocument("Documents//Alice.docx")
Dim document As Document = wordProcessor.Document
Dim firstSection As Section = wordProcessor.Document.Sections(0)
Dim pageMargins = firstSection.Margins
pageMargins.GutterPosition = GutterPosition.Left
pageMargins.Gutter = Units.InchesToDocumentsF(1)
wordProcessor.SaveDocument("Alice_formatted.docx", DocumentFormat.Docx)
End Using
See Also