Skip to main content
All docs
V24.1

SectionMargins.GutterPosition Property

Specifies the gutter margin position for a specific section.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

GutterPosition GutterPosition { get; set; }

Property Value

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.

Remarks

Use the Document.GutterAtTop property to position a gutter margin at the page top. This property specifies gutter margin position for an entire document.

Example

The following code sample adds a left gutter to the first document section:

image

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.OpenXml);   
}
See Also