Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SectionMargins.GutterPosition Property

Specifies the gutter margin position for a specific section.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#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