Skip to content

Commit f95348d

Browse files
authored
Merge pull request #3861 from syncfusion-content/ShowCharacterCountUG-Dev
Add UG for ShowCharCount Support on Maui TextInputLayout
2 parents c3e6df4 + 749af24 commit f95348d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

MAUI/TextInputLayout/Assistive-Labels.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,17 @@ N> Error validations should be done in the application level.
8080

8181
## Character counter
8282

83-
Character counter is used when you need to limit the characters. Character limit can be set using the [CharMaxLength](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfTextInputLayout.html#Syncfusion_Maui_Core_SfTextInputLayout_CharMaxLength) property.
83+
Character counter is used when you need to limit the characters. Character limit can be set using the [CharMaxLength](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfTextInputLayout.html#Syncfusion_Maui_Core_SfTextInputLayout_CharMaxLength) property.The character counter can be enabled by setting the [ShowCharCount]() property to true.
8484

8585
{% tabs %}
8686

8787
{% highlight xaml %}
8888

8989
<inputLayout:SfTextInputLayout Hint="Password"
90-
CharMaxLength="8"
90+
ShowCharCount="true"
91+
CharMaxLength="20"
9192
ContainerType="Outlined"
92-
HelperText="Enter 5 to 8 characters">
93+
HelperText="Enter 5 to 20 characters">
9394
<Entry />
9495
</inputLayout:SfTextInputLayout>
9596

@@ -100,7 +101,8 @@ Character counter is used when you need to limit the characters. Character limit
100101

101102
SfTextInputLayout inputLayout = new SfTextInputLayout();
102103
inputLayout.Hint = "Password";
103-
inputLayout.CharMaxLength = 8;
104+
inputLayout.CharMaxLength = 20;
105+
inputLayout.ShowCharCount = true;
104106
inputLayout.ContainerType= ContainerType.Outlined;
105107
inputLayout.HelperText = "Enter 5 to 8 characters";
106108
inputLayout.Content = new Entry();
@@ -109,7 +111,7 @@ inputLayout.Content = new Entry();
109111

110112
{% endtabs %}
111113

112-
![Character Maximum Length](images/AssistiveLabels/MaxCharCount.png)
114+
![Character Maximum Length](images/AssistiveLabels/textinputlayout_showchar.gif)
113115

114116
N> When character count reaches the maximum character length, the error color will be applied to hint, border, and counter label.
115117

32.7 KB
Loading

0 commit comments

Comments
 (0)