Giter Site home page Giter Site logo

devchive / xamarin.riseplugin.autocompletetextview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cemozguraa/xamarin.riseplugin.autocompletetextview

0.0 0.0 0.0 1.82 MB

Xamarin Forms Native AutoCompleteTextView

License: MIT License

C# 100.00%

xamarin.riseplugin.autocompletetextview's Introduction

AutoCompleteTextView

Description

  • When you add an item source, it automatically suggests items for you. If the text editor is empty and click back button delete last selected item. You can select single or multiple items and you can customize the visuals of the selected items.

Multiple Selection

Delete Items

NugetPackage

https://www.nuget.org/packages/Xamarin.RisePlugin.AutoCompleteTextView

Usage

  • Step1

Add the following NuGet package to your solution.

  • Step2

You must add this line to your AppDelegate.cs before you use AutoCompleteTextView

Xamarin.RisePlugin.AutoCompleteTextView.iOS.AutoCompleteTextViewRenderer.Init();
  • Step3 (Important)

You must call these properties NamePath, ItemTemplate, SelectedItemTemplate, ItemsSource, SelectedItemsSource Like

            auto.ItemsSource = list;
            auto.SelectedItemsSource = new List<test>();
            auto.NamePath = "Text";
            auto.ItemTemplate =  new DataTemplate(() =>
            {
                var stc = new StackLayout() { BackgroundColor = Color.Blue };
                var lbl = new Label();
                lbl.SetBinding(Label.TextProperty, "Text");
                stc.Children.Add(lbl);
                return stc;
            });
            auto.SelectedItemTemplate =  new DataTemplate(() =>
            {
                var stc = new StackLayout() { BackgroundColor = Color.Blue };
                var lbl = new Label();
                lbl.SetBinding(Label.TextProperty, "Text");
                stc.Children.Add(lbl);
                return stc;
            });
Platforms
IOS
Android

Propertys

Property What it does
TextColor Set editor text color.
FontSize Set editor font size.
FontFamily Set editor font family.
FontAttribute Set editor font FontAttribute.
BackgroundColor Set view background color .
TextBackGroundColor Set only editor background color .
PlaceholderColor Set editor placeholder color.
BorderColor Set editor border color.
BorderThickness Set editor border thickness.
BackButtonPressDeleteSelected Clicking back button deletes last selected item.
ClickDeleteSelected Delets clicked item.
SeparatorColor Set separator color dropdown.
SeparatorThickness Set separator thickness dropdown.
SameItemControl Checks selected items, will skip item if this is an already existing one. (Only work SelectionMode.Multiple)
SearchType Set searching criteria
NamePath Type the name you want to show up in the dropdown.
SelectionMode You can select none, single or multiple items.
RowHeight Set dropdown rows height
SelectAfterText Setting the status of the text when selecting an object from dropdown. (Clear = clear the text, Complete = sets the name of the item you select to text, Default = does nothing)
ItemsSource The list you want to show up.
SelectedItemsSource Selected item list
ItemTemplate You can customize the visuals of the dropdown items.
SelectedItemTemplate You can customize the visuals of the selected items.
SelectItem When an dropdown item is selected, properties of that item and the index returns.
SelectSameItem When an dropdown selected item is similar, properties of that item and the index returns.
BackButtonPressDelete When an delete item with back button, properties of that item and the index returns.
TextChanged Triggered when text changes..
ClickSelectedItem Triggered when click selected item..

ItemTemplate And SelectedItemTemplate

  • Only for structured views.

xamarin.riseplugin.autocompletetextview's People

Contributors

cemozguraa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.