I am trying to use the AutocompleteBox for two way Binding and I am Binding it with Dictionary Object. In config.Context I am getting the List which need to be binded to the autocomplete box.
SfAutoComplete autocomplete = new SfAutoComplete {
WidthRequest=200
};
if (!String.IsNullOrEmpty(el.Config))
{
var config = JsonConvert.DeserializeObject(el.Config);
if (config.width != 0)
autocomplete.WidthRequest = config.width;
if(!String.IsNullOrEmpty(config.Context))
autocomplete.DataSource=getlist(config.Context);
}
autocomplete.DisplayMemberPath = "Label";
autocomplete.SuggestionMode = SuggestionMode.Contains;
autocomplete.SuggestionBoxPlacement = SuggestionBoxPlacement.Bottom;
autocomplete.SetBinding(SfAutoComplete.SelectedItemProperty, string.Format("[{0}]", el.Prop), BindingMode.TwoWay);//Binding with Dictionary Object
This way I am binding the SfAutcomplete box for two way Binding.This one is working fine with Android.But with UWP It is getting the data from control to object.But the data from Object to Control is not getting Binded in UWP.
In the Config I am getting the list with Id And Values.
Please Help.