Skip to main content

MultilineEdit.AutofillContentType Property

Gets or sets the hint that helps an autofill service determine how to populate the editor with user data.

Namespace: DevExpress.XamarinForms.Editors

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:

Show 44 items
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.

AUTOFILL_HINT_USERNAME

UITextContentTypeUsername

EmailAddress

Indicates that an autofill service can populate this editor with an email address.

AUTOFILL_HINT_EMAIL_ADDRESS

UITextContentTypeEmailAddress

CreditCardNumber

Indicates that an autofill service can populate this editor with a credit card number.

AUTOFILL_HINT_CREDIT_CARD_NUMBER

UITextContentTypeCreditCardNumber

Name

Indicates that an autofill service can populate this editor with a person’s full name.

AUTOFILL_HINT_PERSON_NAME

UITextContentTypeName

MiddleName

Indicates that an autofill service can populate this editor with a person’s middle name.

AUTOFILL_HINT_PERSON_NAME_MIDDLE

UITextContentTypeMiddleName

FamilyName

Indicates that an autofill service can populate this editor with a person’s last/family name.

AUTOFILL_HINT_PERSON_NAME_FAMILY

UITextContentTypeFamilyName

GivenName

Indicates that an autofill service can populate this editor with a person’s first/given name.

AUTOFILL_HINT_PERSON_NAME_GIVEN

UITextContentTypeGivenName

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).

AUTOFILL_HINT_PERSON_NAME_PREFIX

UITextContentTypeNamePrefix

NameSuffix

Indicates that an autofill service can populate this editor with a person’s name suffix (for example, “Jr.”).

AUTOFILL_HINT_PERSON_NAME_SUFFIX

UITextContentTypeNameSuffix

PhoneNumber

Indicates that an autofill service can populate this editor with a person’s full phone number with country code.

AUTOFILL_HINT_PHONE_NUMBER

UITextContentTypeTelephoneNumber

OneTimeCode

Indicates that an autofill service can populate this editor with a one-time code for delivery over SMS.

AUTOFILL_HINT_SMS_OTP

UITextContentTypeOneTimeCode

PostalCode

Indicates that an autofill service can populate this editor with a postal code.

AUTOFILL_HINT_POSTAL_CODE

UITextContentTypePostalCode

AddressStreet

Indicates that an autofill service can populate this editor with a street address.

AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS

UITextContentTypeFullStreetAddress

AddressCity

Indicates that an autofill service can populate this editor with an address locality (city/town).

AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY

UITextContentTypeAddressCity

AddressState

Indicates that an autofill service can populate this editor with a region/state.

AUTOFILL_HINT_POSTAL_ADDRESS_REGION

UITextContentTypeAddressState

AddressCountry

Indicates that an autofill service can populate this editor with a country name/code.

AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY

UITextContentTypeCountryName

AndroidBirthDate

Indicates that an autofill service can populate this editor with a date of birth.

AUTOFILL_HINT_BIRTH_DATE_FULL

AndroidBirthDay

Indicates that an autofill service can populate this editor with a birth day (of the month).

AUTOFILL_HINT_BIRTH_DATE_DAY

AndroidBirthMonth

Indicates that an autofill service can populate this editor with a birth month.

AUTOFILL_HINT_BIRTH_DATE_MONTH

AndroidBirthYear

Indicates that an autofill service can populate this editor with a birth year.

AUTOFILL_HINT_BIRTH_DATE_YEAR

AndroidCreditCardExpirationDate

Indicates that an autofill service can populate this editor with a credit card expiration date.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

AndroidCreditCardExpirationDay

Indicates that an autofill service can populate this editor with a credit card expiration day.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

AndroidCreditCardExpirationMonth

Indicates that an autofill service can populate this editor with a credit card expiration month.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

AndroidCreditCardExpirationYear

Indicates that an autofill service can populate this editor with a credit card expiration year.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

AndroidCreditCardSecurityCode

Indicates that an autofill service can populate this editor with a credit card security code.

AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

AndroidGender

Indicates that an autofill service can populate this editor with a gender.

AUTOFILL_HINT_GENDER

AndroidNewUsername

Indicates that an autofill service can interpret this editor as a newly created username for save/update.

AUTOFILL_HINT_NEW_USERNAME

AndroidMiddleNameInitial

Indicates that an autofill service can populate this editor with a person’s middle initial.

AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL

AndroidPhoneCountryCode

Indicates that an autofill service can populate this editor with a phone number’s country code.

AUTOFILL_HINT_PHONE_COUNTRY_CODE

AndroidPhoneNational

Indicates that an autofill service can populate this editor with a phone number without country code.

AUTOFILL_HINT_PHONE_NATIONAL

AndroidPhoneNumberDevice

Indicates that an autofill service can populate this editor with the current device’s phone number usually for Sign Up / OTP flows.

AUTOFILL_HINT_PHONE_NUMBER_DEVICE

AndroidAddress

Indicates that an autofill service can populate this editor with an apartment/room/suite number.

AUTOFILL_HINT_POSTAL_ADDRESS

AndroidAddressExtendedAddress

Indicates that an autofill service can populate this editor with auxiliary address details.

AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS

AndroidAddressExtendedPostalCode

Indicates that an autofill service can populate this editor with an extended ZIP/POSTAL code.

AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE

IOSAddressCityAndState

Indicates that an autofill service can populate this editor with a city name and a state name.

UITextContentTypeAddressCityAndState

IOSAddressStreetLine1

Indicates that an autofill service can populate this editor with the first line of a street address.

UITextContentTypeStreetAddressLine1

IOSAddressStreetLine2

Indicates that an autofill service can populate this editor with the second line of a street address.

UITextContentTypeStreetAddressLine2

IOSAddressSublocality

Indicates that an autofill service can populate this editor with a sublocality.

UITextContentTypeSublocality

IOSJobTitle

Indicates that an autofill service can populate this editor with a job title.

UITextContentTypeJobTitle

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.

UITextContentTypeLocation

IOSNickname

Indicates that an autofill service can populate this editor with a nickname.

UITextContentTypeNickname

IOSOrganizationName

Indicates that an autofill service can populate this editor with an organization name.

UITextContentTypeOrganizationName

IOSUrl

Indicates that an autofill service can populate this editor with a URL.

UITextContentTypeURL

Remarks

Use the editor’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 markup below contains a form with the Login, Password, Email, and Birth Date data fields. A user can tap the editor to automatically fill these fields with available values.

Use an editor’s AutofillContentType property to specify a hint that helps an autofill service determine how to populate the editor with user data.

Editors Autofill

<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:dxe="http://schemas.devexpress.com/xamarin/2014/forms/editors">
    <ScrollView>
        <StackLayout Margin="12">
            <dxe:TextEdit
                BoxMode="{Binding SelectedBoxMode}"
                StartIcon="editors_name"
                Text="{Binding Login, Mode=TwoWay}"
                HasError="{Binding LoginHasError}"
                LabelText="Login"
                HelpText="*Required"
                ErrorText="Login is required"
                AutofillContentType="Username"/>
            <dxe:PasswordEdit
                BoxMode="{Binding SelectedBoxMode}"
                StartIcon="editors_password"
                Text="{Binding Password, Mode=TwoWay}"
                HasError="{Binding PasswordHasError}"
                LabelText="Password"
                HelpText="*Required"
                ErrorText="The password should contain more than 5 characters, have at least one uppercase and one lowercase letter, and one number."
                AutofillContentType="Password"/>
            <dxe:TextEdit
                BoxMode="{Binding SelectedBoxMode}"
                StartIcon="editors_email"
                Text="{Binding Email, Mode=TwoWay}"
                HasError="{Binding EmailHasError}"
                LabelText="Email"
                TextHorizontalAlignment="End"
                ErrorText="Email is required"
                HelpText="*Required"
                Suffix="@devexpress.com"
                AffixIndent="0"
                ClearIconVisibility="Never"
                AutofillContentType="EmailAddress"/>
            <dxe:TextEdit
                BoxMode="{Binding SelectedBoxMode}"
                StartIcon="editors_phone"
                Text="{Binding Phone, Mode=TwoWay}"
                HasError="{Binding PhoneHasError}"
                LabelText="Phone"
                Mask="(000) 000-0000"
                AutofillContentType="PhoneNumber"
                ErrorText="Incorrect phone number"
                HelpText="Do not include a country code"
                Keyboard="Telephone"/>
            <dxe:DateEdit
                BoxMode="{Binding SelectedBoxMode}"
                StartIcon="editors_age"
                Date="{Binding BirthDate, Mode=TwoWay}"
                HasError="{Binding BirthDateHasError}"
                LabelText="Birth date"
                TextHorizontalAlignment="End"
                ErrorText="Birth date is required"
                HelpText="*Required"
                IsDateIconVisible="False"
                ClearIconVisibility="Auto"
                DisplayFormat="d"
                AutofillContentType="AndroidBirthDate"/>
            <dxe:SimpleButton Text="SUBMIT" Clicked="OnSubmitClicked" FontAttributes="Bold" />
        </StackLayout>
    </ScrollView>
</ContentPage>
See Also