Header and Footer

We can provide Header and Footer view in the suggestion list in SfAutoComplete by enabling ShowDropDownHeaderView and ShowDropDownFooterView.

Header Content

We can provide Header Content at the top of the AutoComplete’s Suggestion box. DropDownHeaderView property is used to set the content of the header. The following code example illustrate how to set Header content in SfAutoComplete. The height of the Header in the SfAutoComplete can be adjusted by the property DropDownHeaderViewHeight.

//Shows the header view
countryAutoComplete.ShowDropDownHeaderView = true;

//Set height of the Header view
countryAutoComplete.DropDownHeaderViewHeight = 50;
UILabel label = new UILabel();
label.Text = "Search for U";
label.TextColor = UIColor.Blue;
countryAutoComplete.DropDownHeaderView = label;

We can provide Footer Content at the bottom of the AutoComplete’s Suggestion box. DropDownFooterView property is used to set the content of the footer. The following code example illustrate how to set Footer content in SfAutoComplete. The height of the Header in the SfAutoComplete can be adjusted by the property DropDownFooterViewHeight.

//Shows the footer view
countryAutoComplete.ShowDropDownFooterView = true;

//Set height of the Footer view
countryAutoComplete.DropDownFooterViewHeight = 50;
UILabel label = new UILabel();
label.Text = "Add New";
label.TextColor = UIColor.Blue;
countryAutoComplete.DropDownFooterView = label;