DataFormPasswordEditorAttribute.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 PasswordAutofillContentType AutofillContentType { get; set; }
Property Value
Type | Description |
---|---|
PasswordAutofillContentType | 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. |
||
Password | Indicates that an autofill service can populate this editor with a password. |
Remarks
If the attribute’s AutofillContentType property is set to Password, the user can automatically fill the editor with an appropriate password. 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.
<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>