officefileapi-devexpress-dot-xtrarichedit-dot-draftview.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 Draft View.
richEditControl1.Views.DraftView.Padding = new DevExpress.Portable.PortablePadding(100, 20, 100, 20);
richEditControl1.Views.DraftView.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#L36
private void AdjustDraftViewPadding() {
richEditControl1.Views.DraftView.Padding = new PortablePadding(0);
}
winforms-richedit-create-log-viewer-application/CS/Form1.cs#L21
richEditControl1.Views.DraftView.BackColor = Color.Black;
richEditControl1.Views.DraftView.Padding = new PortablePadding(0);
richEditControl1.CreateNewDocument();
winforms-richedit-enable-line-numbering-and-count-document-rows/CS/LineNumberingExample/Form1.cs#L34
this.richEditControl1.Views.SimpleView.Padding = new PortablePadding(60, 4, 4, 0);
this.richEditControl1.Views.DraftView.Padding = new PortablePadding(60, 4, 4, 0);
richEditControl1.Views.SimpleView.AllowDisplayLineNumbers = true;
winforms-richedit-adjust-left-document-padding/VB/Form1.vb#L35
Private Sub AdjustDraftViewPadding()
richEditControl1.Views.DraftView.Padding = New PortablePadding(0)
End Sub
winforms-richedit-create-log-viewer-application/VB/Form1.vb#L24
richEditControl1.Views.DraftView.BackColor = Color.Black
richEditControl1.Views.DraftView.Padding = New PortablePadding(0)
richEditControl1.CreateNewDocument()
winforms-richedit-enable-line-numbering-and-count-document-rows/VB/LineNumberingExample/Form1.vb#L30
richEditControl1.Views.SimpleView.Padding = New PortablePadding(60, 4, 4, 0)
richEditControl1.Views.DraftView.Padding = New PortablePadding(60, 4, 4, 0)
richEditControl1.Views.SimpleView.AllowDisplayLineNumbers = True
See Also