Back to Devexpress

DraftView.Padding Property

officefileapi-devexpress-dot-xtrarichedit-dot-draftview.md

latest4.6 KB
Original Source

DraftView.Padding Property

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

Declaration

csharp
public PortablePadding Padding { get; set; }
vb
Public Property Padding As PortablePadding

Property Value

TypeDescription
DevExpress.Portable.PortablePadding

This structure is equivalent to System.Windows.Forms.Padding and contains padding information.

|

Remarks

The example below shows how to specify left, top, right, and bottom paddings in the Draft View.

csharp
richEditControl1.Views.DraftView.Padding = new DevExpress.Portable.PortablePadding(100, 20, 100, 20);
vb
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

csharp
private void AdjustDraftViewPadding() {
    richEditControl1.Views.DraftView.Padding = new PortablePadding(0);
}

winforms-richedit-create-log-viewer-application/CS/Form1.cs#L21

csharp
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

csharp
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

vb
Private Sub AdjustDraftViewPadding()
    richEditControl1.Views.DraftView.Padding = New PortablePadding(0)
End Sub

winforms-richedit-create-log-viewer-application/VB/Form1.vb#L24

vb
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

vb
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

DraftView Class

DraftView Members

DevExpress.XtraRichEdit Namespace