HLdeMJ / Xamarin.Forms.EntryAutoComplete

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Xamarin.Forms.EntryAutoComplete Build status

Xamarin.Forms.EntryAutoComplete is a custom control which functionality provides you with suggestions while typing. There are several modes of suggestions. The suggested text can be displayed in a drop-down list so that you can choose from different options.

Features

  • Custom search
  • Filtering
  • MaximumVisibleElements
  • MinimumPrefixCharacter
  • Watermark
  • Clear button
  • Style support for Android
  • Style support for iOS

Visuals

Android

demo

iOS

demo

Requirements

  • Xamarin.Forms >= 3.1.0.697729

Installation

Available as a NuGet package.

Install-Package Xamarin.Forms.EntryAutoComplete -Version 1.0.0

Usage

XAML

Reference the assembly namespace

xmlns:customControl="clr-namespace:EntryAutoComplete;assembly=EntryAutoComplete"
<customControl:EntryAutoComplete
            VerticalOptions="CenterAndExpand"
            Placeholder="Enter country..." 
            ItemsSource="{Binding Countries}"
            SearchText="{Binding SearchCountry}"
            SearchMode="{Binding SearchMode}"
            MaximumVisibleElements="5"/>

Code behind

var entryAutoComplete = new EntryAutoComplete
            {
                VerticalOptions = LayoutOptions.CenterAndExpand,
                Placeholder = "Enter country...",
                PlaceholderColor = Color.LightGray,
                MaximumVisibleElements = 5
            };

Contributions

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About


Languages

Language:C# 100.0%