Back to Devexpress

RichEditControl.ScrollToCaret(Single) Method

wpf-devexpress-dot-xpf-dot-richedit-dot-richeditcontrol-dot-scrolltocaret-x28-system-dot-single-x29.md

latest1.8 KB
Original Source

RichEditControl.ScrollToCaret(Single) Method

Scrolls the document so that the caret position is displayed at the specified relative vertical offset.

Namespace : DevExpress.Xpf.RichEdit

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

NuGet Package : DevExpress.Wpf.RichEdit

Declaration

csharp
public void ScrollToCaret(
    float relativeVerticalPosition
)
vb
Public Sub ScrollToCaret(
    relativeVerticalPosition As Single
)

Parameters

NameTypeDescription
relativeVerticalPositionSingle

A number specifying the relative vertical offset. Must be within the range 0.0 - 1.0

|

Remarks

The ScrollToCaret method allows you to scroll the document to display the caret position at the specified relative offset from the top of the control. An offset equal to zero means that the row containing caret will be the first visible row in the document; offset value 1.0 specifies that the mentioned row will be the last visible row.

To get the caret position programmatically, use the Document.CaretPosition property.

See Also

CaretPosition

RichEditControl Class

RichEditControl Members

DevExpress.Xpf.RichEdit Namespace