Back to Devexpress

SectionMargins.Left Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-sectionmargins-d4baaa87.md

latest5.7 KB
Original Source

SectionMargins.Left Property

Gets or sets a value that specifies the left margin.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

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

Property Value

TypeDescription
Single

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

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Left 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.

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

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

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

csharp
richEditControl.ActiveView.ZoomFactor = 2f;
richEditControl.Document.Sections[0].Margins.Left = 50;
richEditControl.Document.Sections[0].Margins.Top = 50;

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

csharp
_section.Page.Landscape = true;
_section.Margins.Left = 500f;
_section.Margins.Right = 500f;

winforms-richedit-adjust-left-document-padding/CS/Form1.cs#L46

csharp
private void AdjustMargins() {
    richEditControl1.Document.Sections[0].Margins.Left = Units.InchesToDocumentsF(2f);
}

winforms-richeditcontrol-common-api/CS/RichEditAPISample/CodeExamples/RichEditControlActions.cs#L364

csharp
Section firstSection = richEdit.Document.Sections[0];
int pageWidth = Convert.ToInt32(firstSection.Page.Width - firstSection.Margins.Left - firstSection.Margins.Right);
e.Graphics.DrawLine(System.Drawing.Pens.Red,

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

vb
document.Sections(0).Margins.Top = Units.InchesToDocumentsF(0.2F)
document.Sections(0).Margins.Left = Units.InchesToDocumentsF(0.2F)
document.Sections(0).Margins.Right = Units.InchesToDocumentsF(0.2F)

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

vb
richEditControl.ActiveView.ZoomFactor = 2F
richEditControl.Document.Sections(0).Margins.Left = 50
richEditControl.Document.Sections(0).Margins.Top = 50

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

vb
_section.Page.Landscape = True
_section.Margins.Left = 500.0F
_section.Margins.Right = 500.0F

winforms-richedit-adjust-left-document-padding/VB/Form1.vb#L45

vb
Private Sub AdjustMargins()
    richEditControl1.Document.Sections(0).Margins.Left = Units.InchesToDocumentsF(2F)
End Sub

winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L372

vb
Dim firstSection As Section = richEdit.Document.Sections(0)
Dim pageWidth As Integer = Convert.ToInt32(firstSection.Page.Width - firstSection.Margins.Left - firstSection.Margins.Right)
e.Graphics.DrawLine(System.Drawing.Pens.Red,

See Also

SectionMargins Interface

SectionMargins Members

DevExpress.XtraRichEdit.API.Native Namespace