Back to Devexpress

SectionMargins.Top Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-sectionmargins-554e49d2.md

latest4.6 KB
Original Source

SectionMargins.Top Property

Gets or sets a value that specifies the top margin.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
float Top { get; set; }
vb
Property Top As Single

Property Value

TypeDescription
Single

A Single value that specifies the top margin in current measure units.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Top property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richedit-in-an-active-grid-cell/CS/Form1.cs#L31

csharp
richEditControl.Document.Sections[0].Margins.Left = 50;
    richEditControl.Document.Sections[0].Margins.Top = 50;
}

word-document-api-print-documents/CS/Program.cs#L32

csharp
_section.Margins.Right = 500f;
_section.Margins.Top = 200f;
_section.Margins.Bottom = 200f;

word-document-api-use-printablecomponentlink-to-print-document/CS/PrintingSystem/Form1.cs#L45

csharp
_section.Margins.Right = 150f;
_section.Margins.Top = 50f;
_section.Margins.Bottom = 50f;

word-document-api-examples/CS/CodeUtils/SyntaxHighlight.cs#L52

csharp
document.Sections[0].Page.Width = Units.InchesToDocumentsF(20);
document.Sections[0].Margins.Top = Units.InchesToDocumentsF(0.2f);
document.Sections[0].Margins.Left = Units.InchesToDocumentsF(0.2f);

winforms-richedit-in-an-active-grid-cell/VB/Form1.vb#L30

vb
richEditControl.Document.Sections(0).Margins.Left = 50
    richEditControl.Document.Sections(0).Margins.Top = 50
End If

word-document-api-print-documents/VB/Program.vb#L20

vb
_section.Margins.Right = 500.0F
_section.Margins.Top = 200.0F
_section.Margins.Bottom = 200.0F

word-document-api-use-printablecomponentlink-to-print-document/VB/PrintingSystem/Form1.vb#L45

vb
_section.Margins.Right = 150F
_section.Margins.Top = 50.0F
_section.Margins.Bottom = 50.0F

word-document-api-examples/VB/CodeUtils/SyntaxHighlight.vb#L42

vb
document.Sections(0).Page.Width = Units.InchesToDocumentsF(20)
document.Sections(0).Margins.Top = Units.InchesToDocumentsF(0.2F)
document.Sections(0).Margins.Left = Units.InchesToDocumentsF(0.2F)

See Also

SectionMargins Interface

SectionMargins Members

DevExpress.XtraRichEdit.API.Native Namespace