Skip to main content
All docs
V22.1
  • DataFormDateEditorAttribute.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 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 attribute’s AutofillContentType property is set to AndroidBirthDate or AndroidCreditCardExpirationDate, the user can automatically fill the editor with an appropriate date. Note that the device should have an enabled autofill service that contains the required values (names, dates, passwords, and so on).

    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.

    Data Form Autofill

    <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>
    
    See Also