Hi Fabio,
Greetings from Syncfusion. We have analyzed the reported query, you can achieve this requirement to get an object property by binding ValueMemberPath for required property and SelectedValue for ViewModel property per the below code snippet.
Code snippet [C#]:
|
<editors:SfTextBoxExt x:Name="textbox" HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="400"
SearchItemPath="Name"
SelectedValue="{Binding Selected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
SelectionChanged="SfTextBoxExt_SelectionChanged"
ValueMemberPath="Email"
AutoCompleteMode="Suggest"
AutoCompleteSource="{Binding Employees}" /> |
Code snippet [C#]:
|
public class ViewModel
{
private object selecteditem;
public object Selected
{
get { return selecteditem; }
set
{
selecteditem = value;
}
}
… |
Here we have bound the Email property to ValueMemberPath, you can modify this property based your application object property name. We have prepared a sample based on this, please find the sample from the following location.
Hope it helps.
Regards,
Muneesh Kumar G.