Skip to content

Commit 0010e4f

Browse files
Merge branch 'development' of https://github.com/syncfusion-content/maui-docs into development
2 parents dc5a8de + 246e65d commit 0010e4f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

MAUI/Masked-Entry/Basic-Features.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,32 @@ The following image illustrates the result of the above code:
315315

316316
![TextAlignment](MaskedEntry_Images/MaskedEntry_TextAlignment.png)
317317

318+
## Select text on focus
319+
320+
The `SelectAllOnFocus` property allows you to automatically select all the text in the masked entry when the control gains focus. This can improve user efficiency by making it easy to replace the entire content. The default value of this property is `true`.
321+
322+
{% tabs %}
323+
{% highlight xaml %}
324+
325+
<editors:SfMaskedEntry WidthRequest="200"
326+
MaskType="Simple"
327+
Mask="(000) 000-0000"
328+
Value="1234567890"
329+
SelectAllOnFocus="True"/>
330+
331+
{% endhighlight %}
332+
{% highlight c# %}
333+
334+
SfMaskedEntry maskedEntry = new SfMaskedEntry();
335+
maskedEntry.WidthRequest = 200;
336+
maskedEntry.MaskType = MaskedEntryMaskType.Simple;
337+
maskedEntry.Mask = "(000) 000-0000";
338+
maskedEntry.Value = "1234567890";
339+
maskedEntry.SelectAllOnFocus = true;
340+
341+
{% endhighlight %}
342+
{% endtabs %}
343+
318344
## ReturnType
319345

320346
The `ReturnType` property specifies the return button (e.g., Next, Done, Go) of the keyboard. It helps manage the flow between multiple input fields by defining what happens when the action button is pressed.

0 commit comments

Comments
 (0)