DataFormMultilineEditorAttribute.AutofillContentType Property
Gets or sets the hint that helps an autofill service determine how to populate the editor with user data.
Namespace: DevExpress.XamarinForms.DataForm
Assembly: DevExpress.XamarinForms.Editors.dll
NuGet Package: DevExpress.XamarinForms.Editors
Declaration
public AutofillContentType AutofillContentType { get; set; }
Property Value
Type | Description |
---|---|
AutofillContentType | The hint that helps an autofill service determine how to populate the editor with user data. |
Available values:
Name | Description | Android | iOS |
---|---|---|---|
None | Indicates that an autofill service cannot populate this editor. |
||
Username | Indicates that an autofill service can populate this editor with a username. |
||
EmailAddress | Indicates that an autofill service can populate this editor with an email address. |
||
CreditCardNumber | Indicates that an autofill service can populate this editor with a credit card number. |
||
Name | Indicates that an autofill service can populate this editor with a person’s full name. |
||
MiddleName | Indicates that an autofill service can populate this editor with a person’s middle name. |
||
FamilyName | Indicates that an autofill service can populate this editor with a person’s last/family name. |
||
GivenName | Indicates that an autofill service can populate this editor with a person’s first/given name. |
||
NamePrefix | Indicates that an autofill service can populate this editor with a person’s name prefix, such as an honorific (“Mr.”, “Ms.”, “Dr.”, and so on). |
||
NameSuffix | Indicates that an autofill service can populate this editor with a person’s name suffix (for example, “Jr.”). |
||
PhoneNumber | Indicates that an autofill service can populate this editor with a person’s full phone number with country code. |
||
OneTimeCode | Indicates that an autofill service can populate this editor with a one-time code for delivery over SMS. |
||
PostalCode | Indicates that an autofill service can populate this editor with a postal code. |
||
AddressStreet | Indicates that an autofill service can populate this editor with a street address. |
||
AddressCity | Indicates that an autofill service can populate this editor with an address locality (city/town). |
||
AddressState | Indicates that an autofill service can populate this editor with a region/state. |
||
AddressCountry | Indicates that an autofill service can populate this editor with a country name/code. |
||
AndroidBirthDate | Indicates that an autofill service can populate this editor with a date of birth. |
||
AndroidBirthDay | Indicates that an autofill service can populate this editor with a birth day (of the month). |
||
AndroidBirthMonth | Indicates that an autofill service can populate this editor with a birth month. |
||
AndroidBirthYear | Indicates that an autofill service can populate this editor with a birth year. |
||
AndroidCreditCardExpirationDate | Indicates that an autofill service can populate this editor with a credit card expiration date. |
||
AndroidCreditCardExpirationDay | Indicates that an autofill service can populate this editor with a credit card expiration day. |
||
AndroidCreditCardExpirationMonth | Indicates that an autofill service can populate this editor with a credit card expiration month. |
||
AndroidCreditCardExpirationYear | Indicates that an autofill service can populate this editor with a credit card expiration year. |
||
AndroidCreditCardSecurityCode | Indicates that an autofill service can populate this editor with a credit card security code. |
||
AndroidGender | Indicates that an autofill service can populate this editor with a gender. |
||
AndroidNewUsername | Indicates that an autofill service can interpret this editor as a newly created username for save/update. |
||
AndroidMiddleNameInitial | Indicates that an autofill service can populate this editor with a person’s middle initial. |
||
AndroidPhoneCountryCode | Indicates that an autofill service can populate this editor with a phone number’s country code. |
||
AndroidPhoneNational | Indicates that an autofill service can populate this editor with a phone number without country code. |
||
AndroidPhoneNumberDevice | Indicates that an autofill service can populate this editor with the current device’s phone number usually for Sign Up / OTP flows. |
||
AndroidAddress | Indicates that an autofill service can populate this editor with an apartment/room/suite number. |
||
AndroidAddressExtendedAddress | Indicates that an autofill service can populate this editor with auxiliary address details. |
||
AndroidAddressExtendedPostalCode | Indicates that an autofill service can populate this editor with an extended ZIP/POSTAL code. |
||
IOSAddressCityAndState | Indicates that an autofill service can populate this editor with a city name and a state name. |
||
IOSAddressStreetLine1 | Indicates that an autofill service can populate this editor with the first line of a street address. |
||
IOSAddressStreetLine2 | Indicates that an autofill service can populate this editor with the second line of a street address. |
||
IOSAddressSublocality | Indicates that an autofill service can populate this editor with a sublocality. |
||
IOSJobTitle | Indicates that an autofill service can populate this editor with a job title. |
||
IOSLocation | Indicates that an autofill service can populate this editor with a location, such as a point of interest, an address, or another way to identify a location. |
||
IOSNickname | Indicates that an autofill service can populate this editor with a nickname. |
||
IOSOrganizationName | Indicates that an autofill service can populate this editor with an organization name. |
||
IOSUrl | Indicates that an autofill service can populate this editor with a URL. |
Remarks
Use the attribute’s AutofillContentType property to specify how an autofill service can populate this editor. Note that the device should have an enabled autofill service that contains the required values (names, dates, passwords, and so on).
See the AutofillContentType enumeration for a list of available hints and their equivalents on the Android and iOS platforms. Note that some hints are only available on Android or iOS.
Example
The code below contains a model with the FirstName, LastName, Address, and City data fields. Each data field corresponds to an editor on the form. A user can automatically fill these editors with appropriate information. When the user taps an editor, it shows available values.
Data fields are annotated with attributes that specify editors. Use an attribute’s AutofillContentType property to specify the hint that helps an autofill service determine how to populate the editor with the user’s data.
<ContentPage
xmlns:dxe="http://schemas.devexpress.com/xamarin/2014/forms/editors"
xmlns:dxdf="http://schemas.devexpress.com/xamarin/2014/forms/dataform">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<dxdf:DataFormView
CommitMode="Manually"
ValidationMode="PropertyChanged"
DataObject="{Binding Model}"
x:Name="dataForm"
EditorLabelColor="#8a8d93"
EditorBoxMode="Filled"
EditorHorizontalSpacing="10"
ReserveBottomTextLine="True"
Margin="0,0,10,0"/>
<dxe:SimpleButton Grid.Row="1" TextColor="White" Padding="22" BackgroundColor="#2088ff" Text="SUBMIT" Clicked="Submit_OnClicked" />
</Grid>
</ContentPage>