Skip to main content

HtmlEdit.SelectionRange Property

Gets or sets the HtmlSelectionRange object that stores the selection’s start character index and selection length. This is a bindable property.

Namespace: DevExpress.Maui.HtmlEditor

Assembly: DevExpress.Maui.HtmlEditor.dll

NuGet Package: DevExpress.Maui.HtmlEditor

Declaration

public HtmlSelectionRange SelectionRange { get; set; }

Property Value

Type Description
HtmlSelectionRange

The HtmlSelectionRange object that stores the selection’s start character index and selection length.

Remarks

The following code snippet defines HTML markup and selects its first 15 characters:

public partial class MainPage : ContentPage {
    public MainPage() {
        InitializeComponent();
        Init();
    }
    async void Init() {
        string text = "<h2>Search Input Field</h2><p>When it comes to locating text-based items quickly, a simple search input field proves to be remarkably effective.</p>";
        await htmledit.SetHtmlSourceAsync(text);
        htmledit.SelectionRange = new SelectionRange(0,18);
    }
}
See Also