Class SfComboBox
Syncfusion SfComboBox provides a simpler way to provided dropdown list
Inheritance
Implements
Namespace: Syncfusion.Android.ComboBox
Assembly: Syncfusion.SfComboBox.Android.dll
Syntax
public class SfComboBox : LinearLayout, View.IOnTouchListener, IJavaObject, IDisposable, IJavaPeerable, ITextWatcher, INoCopySpan
Constructors
SfComboBox(Context)
Initializes a new instance of the SfComboBox class.
Declaration
public SfComboBox(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | Context. |
SfComboBox(Context, IAttributeSet)
Initializes a new instance of the SfComboBox class.
Declaration
public SfComboBox(Context context, IAttributeSet attrs)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | Context. |
Android.Util.IAttributeSet | attrs | Attrs. |
SfComboBox(IntPtr, JniHandleOwnership)
Initializes a new instance of the SfComboBox class.
Declaration
protected SfComboBox(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | javaReference | Java reference. |
Android.Runtime.JniHandleOwnership | transfer | Transfer. |
Fields
Filter
Returns a SuggestionPredicate on filtering
Declaration
public SfComboBox.SuggestionPredicate<object> Filter
Field Value
Type |
---|
SfComboBox.SuggestionPredicate<System.Object> |
Properties
Adapter
Gets or sets the adapter.
Declaration
public ComboBoxAdapter Adapter { get; set; }
Property Value
Type | Description |
---|---|
ComboBoxAdapter | The adapter. |
AllowFiltering
Gets or sets a value indicating whether this SfComboBox allow filtering.
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AutoCollection
Gets or sets the auto collection.
Declaration
public List<string> AutoCollection { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | The auto collection. |
BorderColor
Gets or sets the color of the border.
Declaration
public Color BorderColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the border. |
ClearButtonColor
Gets or sets the color of the show close button.
Declaration
public Color ClearButtonColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the show close button is black |
ComboBoxMode
Gets or sets the value of Auto complete mode property.
Declaration
public ComboBoxMode ComboBoxMode { get; set; }
Property Value
Type | Description |
---|---|
ComboBoxMode | AutoCompleteMode property is used to choose the suggestion display mode in SfAutoComplete control. |
ComboBoxSource
Gets or sets the combo box source.
Declaration
public ArrayAdapter ComboBoxSource { get; set; }
Property Value
Type | Description |
---|---|
Android.Widget.ArrayAdapter | The combo box source. |
CustomView
Gets or sets the custom view.
Declaration
public View CustomView { get; set; }
Property Value
Type | Description |
---|---|
Android.Views.View | The custom view. |
DataSource
Gets or sets the data source.
Declaration
public IEnumerable<object> DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | The Collection of AutoComplete.It may be collection of string or collection of business object |
Delimiter
Gets or sets the delimiter.
Declaration
public char Delimiter { get; set; }
Property Value
Type | Description |
---|---|
System.Char | The delimiter default value is ',' |
DisplayMemberPath
Gets or sets the display member path.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Property specifies the property path with which filtering is done on business objects. |
DropDownBackgroundColor
Gets or sets the value of Drop Down text color
Declaration
public Color DropDownBackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the drop down text. |
DropDownBorderColor
Gets or sets the value of DropDownBorderColor.
Declaration
public Color DropDownBorderColor { get; set; }
Property Value
Type |
---|
Android.Graphics.Color |
DropDownButtonSettings
Gets or sets the drop down button settings.
Declaration
public DropDownButtonSettings DropDownButtonSettings { get; set; }
Property Value
Type | Description |
---|---|
DropDownButtonSettings | The drop down button settings. |
DropDownCornerRadius
Gets or sets the drop down corner radius.
Declaration
public double DropDownCornerRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The drop down corner radius default value is 5 |
DropDownFooterView
Gets or sets the drop down footer view.
Declaration
public View DropDownFooterView { get; set; }
Property Value
Type | Description |
---|---|
Android.Views.View | The drop down footer view default value is null |
DropDownFooterViewHeight
Gets or sets the height of the drop down footer view.
Declaration
public double DropDownFooterViewHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the drop down footer view. |
DropDownHeaderView
Gets or sets the drop down header view.
Declaration
public View DropDownHeaderView { get; set; }
Property Value
Type | Description |
---|---|
Android.Views.View | The drop down header view default value is null |
DropDownHeaderViewHeight
Gets or sets the height of the drop down header.
Declaration
public double DropDownHeaderViewHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the drop down header. |
DropDownItemFontTypeface
Gets or sets the drop down item font typeface.
Declaration
public Typeface DropDownItemFontTypeface { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Typeface | The drop down item font typeface. |
DropDownItemHeight
Gets or sets the height of the drop down item.
Declaration
public double DropDownItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the drop down item. |
DropDownTextColor
Gets or sets the value of Drop Down text color
Declaration
public Color DropDownTextColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the drop down text. |
DropDownTextSize
Gets or sets the size of the drop down text.
Declaration
public int DropDownTextSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The size of the drop down text. |
DropDownWidth
Gets or sets the width of the drop down.
Declaration
public int DropDownWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The width of the drop down. |
EnableAutoSize
Gets or sets the enable auto sizing property value
Declaration
public bool EnableAutoSize { get; set; }
Property Value
Type |
---|
System.Boolean |
EnableSelectionIndicator
Gets or sets the EnableSelectionIndicator of the DropDown.
Declaration
public bool EnableSelectionIndicator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default Value is true. |
FilteredItems
Gets or sets the filtered items.
Declaration
public IEnumerable<object> FilteredItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | The filtered items default value is null |
FontTypeface
Gets or sets the font typeface.
Declaration
public Typeface FontTypeface { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Typeface | The font typeface of AutoComplete |
HighlightedTextColor
Gets or sets the color of the highlight text.
Declaration
public Color HighlightedTextColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the highlight text. |
HighlightedTextFontTypeFace
Gets or sets the highlight text font type face.
Declaration
public TypefaceStyle HighlightedTextFontTypeFace { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.TypefaceStyle | The highlight text font type face. |
IgnoreDiacritic
Gets or sets a value indicating whether this SfAutoComplete enable diacritic.
Declaration
public bool IgnoreDiacritic { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ImageMemberPath
Gets or sets the token image path.
Declaration
public string ImageMemberPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The token image path default value is null |
ImageSource
Gets or sets the image source.
Declaration
public ArrayAdapter ImageSource { get; set; }
Property Value
Type | Description |
---|---|
Android.Widget.ArrayAdapter | The image source. |
IndicatorText
Gets or sets the text of the SelectionIndicator.
Declaration
public string IndicatorText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The IndicatorText of the SelectionIndicator. |
IndicatorTextColor
Gets or sets the IndicatorTextColor of the SelectionIndicator.
Declaration
public Color IndicatorTextColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The default value is Blue. |
IndicatorTextSize
Gets or sets the IndicatorTextColor of the SelectionIndicator.
Declaration
public double IndicatorTextSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 20. |
IndicatorTypeface
Gets or sets the IndicatorTypeface of the SelectionIndicator.
Declaration
public Typeface IndicatorTypeface { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Typeface | The IndicatorTypeface of the SelectionIndicator. |
InputType
Gets or sets the type of the input.
Declaration
public InputTypes InputType { get; set; }
Property Value
Type | Description |
---|---|
Android.Text.InputTypes | The type of the input. |
IsDropDownOpen
Gets or sets a value indicating whether this SfAutoComplete is drop down open.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsEditableMode
Gets or sets a value indicating whether this SfComboBox is editable mode.
Declaration
public bool IsEditableMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsFocused
Gets or sets a value indicating whether this SfAutoComplete is focused.
Declaration
public bool IsFocused { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsSelectedItemsVisibleInDropDown
Gets or sets a value indicating whether this SfAutoComplete is selected item visible in drop down.
Declaration
public bool IsSelectedItemsVisibleInDropDown { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ItemPadding
Gets or sets the Padding of the drop down item.
Declaration
public ItemPadding ItemPadding { get; set; }
Property Value
Type | Description |
---|---|
ItemPadding | The Padding of the drop down item. |
ItemsSource
Gets SfComboBox ItemSource.
Declaration
public List<SfComboBoxItem> ItemsSource { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<SfComboBoxItem> |
LoadMoreText
Gets or sets the load more text.
Declaration
public string LoadMoreText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The load more text. |
LoadMoreView
Gets or sets the load more view.
Declaration
public View LoadMoreView { get; set; }
Property Value
Type | Description |
---|---|
Android.Views.View | The load more default value is null |
MaximumDropDownHeight
Gets or sets the maximum height of the drop down.
Declaration
public int MaximumDropDownHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The maximum height of the drop down. |
MaximumSuggestion
Gets or sets the MaximumSuggestion.
Declaration
public int MaximumSuggestion { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The MaximumSuggestion of Autocomplete. |
MinimumPrefixCharacters
Gets or sets the minimum prefix characters.
Declaration
public int MinimumPrefixCharacters { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Instead of displaying suggestion list on every character entry, matches can be filtered and displayed after a few character entries. |
MultiSelectMode
MultiSelectMode property is used to choose the selected text shown in control
Declaration
public MultiSelectMode MultiSelectMode { get; set; }
Property Value
Type | Description |
---|---|
MultiSelectMode | Defalut value is Normal |
NoResultsFoundFontSize
Gets or sets the size for the no results found text.
Declaration
public int NoResultsFoundFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The no results found text size. |
NoResultsFoundText
Gets or sets the no results found text.
Declaration
public string NoResultsFoundText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The no results found text. |
NoResultsFoundTextColor
Gets or sets the color for the no results found text.
Declaration
public Color NoResultsFoundTextColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The no results found text color. |
NoResultsFoundTypeface
Gets or sets the typeface for the no results found text.
Declaration
public Typeface NoResultsFoundTypeface { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Typeface | The no results found typeface. |
PopUpDelay
Gets or sets the pop up delay.
Declaration
public int PopUpDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The pop up delay. |
SearchDelay
Gets or sets the search delay.
Declaration
public int SearchDelay { get; set; }
Property Value
Type |
---|
System.Int32 |
SelectAllOnFocus
Gets or sets a value indicating whether determines whether to select all or not.
Declaration
public bool SelectAllOnFocus { get; set; }
Property Value
Type |
---|
System.Boolean |
SelectedDropDownItemColor
Gets or sets the color of the selected drop down item.
Declaration
public Color SelectedDropDownItemColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the selected drop down item. |
SelectedIndex
Gets or sets the index of the selected.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the selected item. |
SelectedIndices
Gets or sets the selected indices.
Declaration
public object SelectedIndices { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The selected indices. |
SelectedItem
Gets or sets the selected item.
Declaration
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The selected item. |
SelectedValue
Gets or sets the selected value.
Declaration
public object SelectedValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The selected value of AutoComplete. |
SelectedValuePath
Gets or sets the selected value path.
Declaration
public string SelectedValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Defines which property (by its name) of the objects bound to AutoComplete DataSource |
SelectionType
Gets or sets the value of SelectionType property.
Declaration
public SelectionType SelectionType { get; set; }
Property Value
Type | Description |
---|---|
SelectionType | SelectionType property is used to select the item to selected or not in SfAutoComplete control. |
ShowBorder
Gets or sets a value indicating whether this SfAutoComplete show border.
Declaration
public bool ShowBorder { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowClearButton
Gets or sets a value indicating whether this SfAutoComplete show close button.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowDropDownFooterView
Gets or sets a value indicating whether this SfAutoComplete show drop down footer view.
Declaration
public bool ShowDropDownFooterView { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowDropDownHeaderView
Gets or sets a value indicating whether this SfAutoComplete show drop down header view.
Declaration
public bool ShowDropDownHeaderView { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowSuggestionsOnFocus
Gets or sets a value indicating whether this SfAutoComplete show suggestions on focus.
Declaration
public bool ShowSuggestionsOnFocus { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SuggestionBoxPlacement
Gets or sets the suggestion box placement.
Declaration
public SuggestionBoxPlacement SuggestionBoxPlacement { get; set; }
Property Value
Type | Description |
---|---|
SuggestionBoxPlacement | The suggestion box placement options |
SuggestionMode
Gets or sets the suggestion mode.
Declaration
public SuggestionMode SuggestionMode { get; set; }
Property Value
Type | Description |
---|---|
SuggestionMode | The phenomenon of string comparison for filtering suggestions can be changed by using SuggestionMode |
Text
Gets or sets the text.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text of AutoComplete control |
TextColor
Gets or sets the color of the text.
Declaration
public Color TextColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the text. |
TextHighlightMode
Gets or sets the text highlight mode.
Declaration
public OccurrenceMode TextHighlightMode { get; set; }
Property Value
Type | Description |
---|---|
OccurrenceMode | The text highlight mode. |
TextSize
Gets or sets the size of the text.
Declaration
public int TextSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The size of the text. |
TextTypeFace
Gets or sets the text type face.
Declaration
public Typeface TextTypeFace { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Typeface | The text type face of AutoComplete |
TokenSettings
Gets or sets the token settings.
Declaration
public TokenSettings TokenSettings { get; set; }
Property Value
Type | Description |
---|---|
TokenSettings | The token settings. |
TokensWrapMode
TokensWrapMode is used to set the Orientation of the token placement
Declaration
public TokensWrapMode TokensWrapMode { get; set; }
Property Value
Type | Description |
---|---|
TokensWrapMode | Default value is Horizontal |
Watermark
Gets or sets the value of Water mark property.
Declaration
public string Watermark { get; set; }
Property Value
Type | Description |
---|---|
System.String | Supports explanatory text inside AutoComplete control until the user inputs text |
WatermarkColor
Gets or sets the color of the watermark.
Declaration
public Color WatermarkColor { get; set; }
Property Value
Type | Description |
---|---|
Android.Graphics.Color | The color of the watermark. |
Methods
AfterTextChanged(IEditable)
Afters the text changed.
Declaration
public void AfterTextChanged(IEditable s)
Parameters
Type | Name | Description |
---|---|---|
Android.Text.IEditable | s | Edit table |
BeforeTextChanged(ICharSequence, Int32, Int32, Int32)
Befores the text changed.
Declaration
public void BeforeTextChanged(ICharSequence s, int start, int count, int after)
Parameters
Type | Name | Description |
---|---|---|
Java.Lang.ICharSequence | s | char sequence value |
System.Int32 | start | Start value |
System.Int32 | count | Count value |
System.Int32 | after | After value |
Clear()
Clear the Text of AutoComplete.
Declaration
public void Clear()
Dispose(Boolean)
Dispose the specified disposing.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | If set to |
Focus()
Focus the AutoComplete.
Declaration
public void Focus()
GetAutoEditText()
Gets the auto edit text.
Declaration
public EditText GetAutoEditText()
Returns
Type | Description |
---|---|
Android.Widget.EditText | The auto edit text. |
GetAutoPopUpWindow()
Gets the auto pop up window.
Declaration
public PopupWindow GetAutoPopUpWindow()
Returns
Type | Description |
---|---|
Android.Widget.PopupWindow | The auto pop up window. |
LoadMoreItems()
Loadmore method.
Declaration
public void LoadMoreItems()
LoadMoreItems(Int32)
Loads the more.
Declaration
public void LoadMoreItems(int suggestionCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | suggestionCount |
OnLayout(Boolean, Int32, Int32, Int32, Int32)
On the layout.
Declaration
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | changed | If set to |
System.Int32 | left | Left value |
System.Int32 | top | Top value |
System.Int32 | right | Right value |
System.Int32 | bottom | Bottom value |
OnRtlPropertiesChanged(LayoutDirection)
Method called when any RTL property (layout direction or text direction or text alignment) has been changed.
Declaration
public override void OnRtlPropertiesChanged(LayoutDirection layoutDirection)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.LayoutDirection | layoutDirection | layoutDirection |
OnSizeChanged(Int32, Int32, Int32, Int32)
On the size changed.
Declaration
protected override void OnSizeChanged(int w, int h, int oldw, int oldh)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | w | The width. |
System.Int32 | h | The height. |
System.Int32 | oldw | Old width. |
System.Int32 | oldh | Old height. |
OnTextChanged(ICharSequence, Int32, Int32, Int32)
Ons the text changed.
Declaration
public void OnTextChanged(ICharSequence s, int start, int before, int count)
Parameters
Type | Name | Description |
---|---|---|
Java.Lang.ICharSequence | s | char sequence value |
System.Int32 | start | Start value |
System.Int32 | before | Before value |
System.Int32 | count | Count value |
OnTouch(View, MotionEvent)
Ons the touch.
Declaration
public bool OnTouch(View view, MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.View | view | View type |
Android.Views.MotionEvent | e | Motion event |
Returns
Type | Description |
---|---|
System.Boolean |
|
OnTouchEvent(MotionEvent)
Ons the touch event.
Declaration
public override bool OnTouchEvent(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | The Parameter. |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetCursorPosition(Int32)
Cursors the position.
Declaration
public void SetCursorPosition(int position)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position | Position. |
Events
Completed
Occurs when done button called.
Declaration
public event EventHandler<EventArgs> Completed
Event Type
Type |
---|
System.EventHandler<System.EventArgs> |
DropDownClosed
Occurs when done button called.
Declaration
public event EventHandler<EventArgs> DropDownClosed
Event Type
Type |
---|
System.EventHandler<System.EventArgs> |
DropDownClosing
Occurs when dropdown closed.
Declaration
public event EventHandler<DropDownCancelEventArgs> DropDownClosing
Event Type
Type |
---|
System.EventHandler<DropDownCancelEventArgs> |
DropDownOpen
Occurs when focus changed.
Declaration
public event EventHandler<EventArgs> DropDownOpen
Event Type
Type |
---|
System.EventHandler<System.EventArgs> |
FilterCollectionChanged
Occurs when filtered collection changed.
Declaration
public event EventHandler<FilterCollectionChangedEventArgs> FilterCollectionChanged
Event Type
Type |
---|
System.EventHandler<FilterCollectionChangedEventArgs> |
FocusChanged
Occurs when focus changed.
Declaration
public event EventHandler<FocusChangedEventArgs> FocusChanged
Event Type
Type |
---|
System.EventHandler<FocusChangedEventArgs> |
LoadMoreButtonTapped
Occurs when done tapped on the load more button.
Declaration
public event EventHandler<EventArgs> LoadMoreButtonTapped
Event Type
Type |
---|
System.EventHandler<System.EventArgs> |
SelectionChanged
Occurs when selection changed.
Declaration
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
Type |
---|
System.EventHandler<SelectionChangedEventArgs> |
SelectionChanging
Occurs when the user selects an item from unselected items.
Declaration
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
Event Type
Type |
---|
System.EventHandler<SelectionChangingEventArgs> |
TextChanged
Occurs when text changed.
Declaration
public event EventHandler<TextChangedEventArgs> TextChanged
Event Type
Type |
---|
System.EventHandler<TextChangedEventArgs> |