Skip to main content
A newer version of this page is available. .

AutoCompleteEdit.ItemsSourceProvider Property

Gets or sets the data provider that supplies suggestions.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

NuGet Package: DevExpress.XamarinForms.Editors

Declaration

public ItemsSourceProviderBase ItemsSourceProvider { get; set; }

Property Value

Type Description
ItemsSourceProviderBase

A data provider that supplies suggestions.

Examples

The example below uses the AsyncItemsSourceProvider to supply suggestions for the AutoCompleteEdit.

<dxe:AutoCompleteEdit
    LabelText="State"
    PlaceholderText="Type here to search..."
    VerticalOptions="Center"
    Margin="16,0">

    <dxe:AutoCompleteEdit.ItemsSourceProvider>
        <dxe:AsyncItemsSourceProvider SuggestionsRequested="OnDelegateRequested" />
    </dxe:AutoCompleteEdit.ItemsSourceProvider>
</dxe:AutoCompleteEdit>

The example below uses the FilteredItemsSourceProvider to supply suggestions for the AutoCompleteEdit.

<ContentPage.BindingContext>
    <local:AutoCompleteEditViewModel/>
</ContentPage.BindingContext>

<dxe:AutoCompleteEdit>
    <dxe:AutoCompleteEdit.ItemsSourceProvider>
        <dxe:FilteredItemsSourceProvider SuggestionsSource="{Binding ItemsSource}"
                                         FilterMode="Contains"
                                         FilterComparisonType="CurrentCultureIgnoreCase"
                                         FilterMembers="Name, Capital"/>
    </dxe:AutoCompleteEdit.ItemsSourceProvider>

    <dxe:AutoCompleteEdit.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Label Padding="10" Text="{Binding Name}" FontAttributes="Bold"/>
                <Label Padding="10" Grid.Column="1" Text="{Binding Abbr}"/>
                <Label Padding="10" Grid.Column="2" Text="{Binding Capital}" HorizontalTextAlignment="End"/>
            </Grid>
        </DataTemplate>
    </dxe:AutoCompleteEdit.ItemTemplate>
</dxe:AutoCompleteEdit>
See Also