Skip to main content
All docs
V22.1
  • DateEdit.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 DateAutofillContentType AutofillContentType { get; set; }

    Property Value

    Type Description
    DateAutofillContentType

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

    Available values:

    Name Description Android
    None

    Indicates that an autofill service cannot populate this editor.

    AndroidBirthDate

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

    AUTOFILL_HINT_BIRTH_DATE_FULL

    AndroidCreditCardExpirationDate

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

    AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

    Remarks

    If the editor’s AutofillContentType property is set to AndroidBirthDate or AndroidCreditCardExpirationDate, a user can tap the editor to automatically fill this field with an available date. Note that the device should have an enabled autofill service.

    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