officefileapi-devexpress-dot-xtrarichedit-dot-simpleview.md
Gets or sets the distance in pixels between the text and the control’s borders.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public PortablePadding Padding { get; set; }
Public Property Padding As PortablePadding
| Type | Description |
|---|---|
| DevExpress.Portable.PortablePadding |
This structure is equivalent to System.Windows.Forms.Padding and contains padding information.
|
The example below shows how to specify left, top, right, and bottom paddings in the Simple View.
richEditControl1.Views.SimpleView.Padding = new DevExpress.Portable.PortablePadding(100, 20, 100, 20);
richEditControl1.Views.SimpleView.Padding = New DevExpress.Portable.PortablePadding(100, 20, 100, 20)
The following code snippets (auto-collected from DevExpress Examples) contain references to the Padding 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-adjust-left-document-padding/CS/Form1.cs#L32
private void AdjustSimpleViewPadding() {
richEditControl1.Views.SimpleView.Padding = new PortablePadding(0);
}
winforms-richedit-enable-line-numbering-and-count-document-rows/CS/LineNumberingExample/Form1.cs#L33
#region #linenumbering
this.richEditControl1.Views.SimpleView.Padding = new PortablePadding(60, 4, 4, 0);
this.richEditControl1.Views.DraftView.Padding = new PortablePadding(60, 4, 4, 0);
winforms-richeditcontrol-common-api/CS/RichEditAPISample/CodeExamples/RichEditControlActions.cs#L615
richEditControl.LoadDocument("Documents\\Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
richEditControl.Views.SimpleView.Padding = new DevExpress.Portable.PortablePadding(60, 4, 4, 0);
richEditControl.Views.SimpleView.AllowDisplayLineNumbers = true;
winforms-richedit-adjust-left-document-padding/VB/Form1.vb#L31
Private Sub AdjustSimpleViewPadding()
richEditControl1.Views.SimpleView.Padding = New PortablePadding(0)
End Sub
winforms-richedit-enable-line-numbering-and-count-document-rows/VB/LineNumberingExample/Form1.vb#L29
#Region "#linenumbering"
richEditControl1.Views.SimpleView.Padding = New PortablePadding(60, 4, 4, 0)
richEditControl1.Views.DraftView.Padding = New PortablePadding(60, 4, 4, 0)
winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L631
richEditControl.LoadDocument("Documents\Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
richEditControl.Views.SimpleView.Padding = New DevExpress.Portable.PortablePadding(60, 4, 4, 0)
richEditControl.Views.SimpleView.AllowDisplayLineNumbers = True
See Also