MaterialEntry
November 23, 2023 ยท View on GitHub
Text fields let users enter and edit text.
View Material Design documentation
Screenshot
Example
<material3:MaterialEntry
LabelText="Name *"
Placeholder="Enter your name"
MaxLength="50"
Text="{Binding Name}"
SupportingText="Name is required"
AnimateError="True"
TabIndex="1"
ReturnType="Next"
SupportingTextColor="Red" />
Documentation
Property Keyboard
Default keyboard and base class for specialized keyboards, such as those for telephone numbers, email, URLs and others.
Allowed Values:
- Plain
- Chat
- Numeric
- Telephone
- Text
- URL
Property KeyboardFlags
Enumerates keyboard option flags that controls capitalization, spellcheck, suggestion behavior and others.
Allowed Values:
- CapitalizeSentence
- Spellcheck
- Suggestions
- CapitalizeWord
- CapitalizeCharacter
- CapitalizeNone
- All
- None
Usage Example
- Using only one flag
<material3:MaterialEntry
LabelText="Name *"
Placeholder="Enter your name"
MaxLength="50"
KeyboardFlags="CapitalizeWord"
Text="{Binding Name}"
SupportingText="Name is required"
AnimateError="True"
TabIndex="1"
ReturnType="Next"
SupportingTextColor="Red" />
- Using multiple flags
<material3:MaterialEntry
LabelText="Name *"
Placeholder="Enter your name"
MaxLength="50"
KeyboardFlags="CapitalizeWord|Suggestions"
Text="{Binding Name}"
SupportingText="Name is required"
AnimateError="True"
TabIndex="1"
ReturnType="Next"
SupportingTextColor="Red" />
Property TextTransform:
This property is to set a text transform.
Allowed Values:
- Default
- Lowercase
- Uppercase
Property ReturnType:
This property is to set the keyboard return button style,
Allowed Values:
- Done
- Go
- Next
- Search
- Send
Property ReturnCommand:
This property is to set the behavior after click on return button.
Property Text:
This property is to set the current text.
Property MaxLength:
This property is to set the max length of the text.
Property CursorPosition:
This property is to set the cursor position.
Property TextChanged:
This property is to set the event after the text changed.
Property CornerRadius:
This property is to set the corner radius for the control. This is used only when you set HasBorder as true.
CornerRadius supports a uniform radius to the four corners or you can set a different corner radius for each corner:
- CornerRadius="10"
- CornerRadius="0,10,10,10"
Property AnimateError:
This property is to set the if you want or not animate the control on error.
Property HorizontalTextAlignment:
This property is to set the horizontal text alignment.
Allowed Values:
- Start
- Center
- End
Property TextColor:
This property is to set the text color.
Property FocusedTextColor:
This property is to set the focused text color.
Property DisabledTextColor:
This property is to set the disabled text color.
Property FontSize:
This property is to set the font size.
Property FontFamily:
This property is to set the font family.
Property Placeholder:
This property is to set the placeholder of the material entry.
Property PlaceholderColor:
This property is to set the placeholder color of the material entry.
Property AnimatePlaceholder:
If you set this property to true the placeholder will be translated to label place. you mustn't set Label Text
Property LabelText:
This property is to set the label of the material entry.
Property LabelTextColor:
This property is to set the label color of the material entry.
Property FocusedLabelTextColor:
This property is to set the focused label color.
Property DisabledLabelTextColor:
This property is to set the disabled label color.
Property LabelSize:
This property is to set the label size of the material entry.
Property LabelFontFamily:
This property is to set the label font family of the material entry.
Property LabelMargin:
This property is to set the label margin family of the material entry. By default uses (16,0,16,0).
Property SupportingText:
This property is to set the supporting text of the material entry.
Property SupportingTextColor:
This property is to set the supporting text color of the material entry.
Property SupportingSize:
This property is to set the supporting text size of the material entry.
Property SupportingFontFamily:
This property is to set the supporting text font family of the material entry.
Property SupportingMargin:
This property is to set the supporting text margin of the material entry. By default uses (16,4,16,0).
Property BorderColor:
This property is to set the border color. This is enabled when you set the property HasBorder equals true.
Property FocusedBorderColor:
This property is to set the focused border color. This is enabled when you set the property HasBorder equals true.
Property DisabledBorderColor:
This property is to set the border color. This is enabled when you set the property HasBorder equals true.
Property HasBorder:
This property is to set if this control has border or not.
Property BorderWidth:
This property is to set the border width.
Property IsPassword:
This property is to set if this control behaves as password entry.
Property IndicatorColor:
This property is to set the indicator color.
Property CursorColor:
This property is to set the cursor color. Only supported on iOS
Property BackgroundColor:
This property is to set the background color.
Property LeadingIcon:
This property is to set the leading icon. This can be png or jpg.
Property CustomLeadingIcon:
This property is to set the leading icon with support to svg.
Property LeadingIconCommand:
This property is to set the leading icon command.
Property LeadingIconCommandParameter:
This property is to set the leading icon command parameter.
Property TrailingIcon:
This property is to set the trailing icon. This can be png or jpg.
Property CustomTrailingIcon:
This property is to set the trailing icon with support to svg.
Property TrailingIconCommand:
This property is to set the trailing icon command.
Property TrailingIconCommandParameter:
This property is to set the trailing icon command parameter.
Property LabelLineBreakMode:
This property is to set the Label Line Break Mode
Allowed values
- NoWrap,
- WordWrap,
- CharacterWrap,
- HeadTruncation,
- TailTruncation,
- MiddleTruncation
Property SupportingLineBreakMode:
This property is to set the Supporting LineBreakMode.
Allowed values
- NoWrap,
- WordWrap,
- CharacterWrap,
- HeadTruncation,
- TailTruncation,
- MiddleTruncation
Property Padding:
This property is to set the padding of the control. By default uses (16, 8).