Hi,
I would like to know how to bind the selectedvaue to a viewmodel property. To me is me very easy in other controls, however I have some difficulties with your control because it doesn't work as I would like.
In my viewmodel, I have a property called "SelectedCustomer" which is a type "Customer" class.
The only way to update this property, is from view by creating a method in code-behind to SelectionChanged, and then assing this value directly, which clearly breaks MVVM pattern.
void txtCustomer_SelectionChanged(object sender, Syncfusion.SfAutoComplete.XForms.SelectionChangedEventArgs e)
{
vm.SelectedCustomer = !String.IsNullOrEmpry(e.Value.ToString()) ? (Customer)e.Value : null;
}
The only way to get the entire object and not only the string of the selectedcustomer is in e.Value;
Is there any other alternative to bind with a more MVVM friendly approach?