TextEditBase.SetSelection(Int32) Method
Selects the editor’s text starting from the specified character to the last character.
Namespace: DevExpress.Maui.Editors
Assembly: DevExpress.Maui.Editors.dll
NuGet Package: DevExpress.Maui.Editors
Declaration
public void SetSelection(
int start
)
Parameters
Name | Type | Description |
---|---|---|
start | Int32 | The zero-based index of the first selected character. |
Remarks
The following code sample selects all the characters after the first character:
<ContentPage ...
xmlns:dxe="clr-namespace:DevExpress.Maui.Editors;assembly=DevExpress.Maui.Editors">
<ContentPage.Content>
<StackLayout>
<Button Clicked="SelectText_Clicked" Text="Select Text"/>
<dxe:TextEdit x:Name="textedit" Text="Input Text" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
public partial class MainPage : ContentPage {
// ...
private void SelectText_Clicked(object sender, EventArgs e) {
textedit.SetSelection(1);
}
}
See Also