-
Notifications
You must be signed in to change notification settings - Fork 3
TextFields
An Entry
allows you to enter a single line of text. We have derived from MAUI's implementation of Entry
: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/entry.
Here we place an Entry with no borders and also all the text will be focused upon focusing the Entry
.
<dui:Entry Placeholder="Input text"
HasBorder="False"
ShouldSelectAllTextOnFocused="True" />
Inspect the components properties class to further customize and use it.
An 'Editor' allows you to enter and edit multiple lines of text. Also here we have derived from MAUI's implementation of Editor
: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/editor?view=net-maui-8.0
Here we place an Editor
with no borders and also all the text will be focused upon focusing the Editor
.
Setting HasBorder="False" has no effect on iOS, only Android. iOS has no borders on
Editor
by default.
<dui:Editor Placeholder="Test"
HasBorder="False"
ShouldSelectAllTextOnFocused="True">
Inspect the components properties class to further customize and use it.
SingleLineInputField
is a UI component designed for single-line text input.
<dui:SingleLineInputField HelpText="This is for help purposes"
HeaderText="This is a header" />
- HeaderText: Display a header text above the input field to provide additional context.
- HelpText: Include a help text below the input field for supplementary guidance.
Inspect the components properties class to further customize and use it.
MultiLineInputField
is a UI component designed for multi-line text input, and inherits from SingleLineInputField.
<dui:MultiLineInputField HelpText="This is for help purposes"
HeaderText="This is a header"
IsSaving="True"
IsError="False"
IsSavingSuccess="True"
MaxLines="2">
- Save Command: Execute custom logic with the SaveCommand property, handling the save button tap.
- Saving State: Indicate the saving state with IsSaving and provide feedback with IsSavingSuccess.
- Error Handling: Handle errors by setting IsError and providing error text via the ErrorText property.
- MaxLines: Sets the maximum number of lines before the text is truncated. (NB: Is only truncated when it is not focused)
Inspect the components properties class to further customize and use it.