Skip to content

This sample demonstrates a solution for automatically selecting all the current value upon gaining focus in a Xamarin.Forms SfMaskedEdit control.

Notifications You must be signed in to change notification settings

SyncfusionExamples/How-to-select-all-the-current-value-on-focus-in-Xamarin.Forms-SfMaskedEdit

Repository files navigation

How-to-select-all-the-current-value-on-focus-in-Xamarin.Forms-SfMaskedEdit

This article explains how to select all the text on focus in Syncfusion Xamarin.Forms SfMaskedEdit with the following steps.

Step 1: Create an SfMaskedEdit sample with all the necessary assemblies. Refer to this Getting started documentation to create a simple SfImageEditor sample and configure it.

Step 2: By enabling the SelectAllOnFocus property of the SfMaskedEdit control to select all the value when focus on control as per in the below code sample.

[XAML]

   <maskedEdit:SfMaskedEdit Mask="00000" 
                           SelectAllOnFocus ="True"
                           Value="12345" 
                          />

Output:

Selected value of SfMaskedEdit ar focus state

See also

What are mask types in SfMaskedEdit

How to hide the prompt character

How to hide the clear button in SfMaskedEdit

About

This sample demonstrates a solution for automatically selecting all the current value upon gaining focus in a Xamarin.Forms SfMaskedEdit control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages