Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150309 | Dec 31,2019 08:16 PM UTC | Feb 17,2020 09:53 AM UTC | Xamarin.Forms | 8 |
![]() |
Tags: SfAutoComplete |
<autocomplete:SfAutoComplete DisplayMemberPath="Name" MaximumDropDownHeight="200"
DataSource="{Binding EmployeeCollection}" /> |
<local:CustomComboBox x:Name="comboBox" IsEditableMode="True" MultiSelectMode="Delimiter" VerticalOptions="Center" Watermark="Start typing"
HeightRequest="40" SuggestionBoxPlacement="Top"
DisplayMemberPath="Name" MaximumDropDownHeight="300"
DataSource="{Binding EmployeeCollection}"/>
|
comboBox.DropDownButtonSettings = new Syncfusion.XForms.ComboBox.DropDownButtonSettings() { Width = 0, Height = 0 }; |
[assembly: ExportRenderer(typeof(CustomComboBox), typeof(ComboBoxRenderer))]
namespace AutoCompleteSample.Droid
{
public class ComboBoxRenderer : SfComboBoxRenderer
{
public ComboBoxRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Syncfusion.XForms.ComboBox.SfComboBox> e)
{
base.OnElementChanged(e);
if (e.NewElement != null)
{
Control.DropDownOpen += Control_DropDownOpen;
}
}
private void Control_DropDownOpen(object sender, EventArgs e)
{
if (Control.SuggestionBoxPlacement == Syncfusion.Android.ComboBox.SuggestionBoxPlacement.Top)
{
Control.GetAutoPopUpWindow().ShowAtLocation(this, GravityFlags.NoGravity, 50, 100);
}
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.