First of all using Binding on Text and SelectedItem properties together ? Maybe it's not a good idea.
Its right when you use binding on SelectedItem this manages Text properties value for you.
If you use a ViewModel, I suggest you to bind one property of AutocompleteBox and just use SuburbText prop. in VM. (or just bind SelectedItem and you may use ValueMemberPath with it)
Edit 1:
//Suppose myVM.SuburbText is a local variable in VM, this shows Text prp. binding
//But I prefer Object binding with ValueMemberPath,you may use one of them
//But not both together
public string TextWillBeBound
{
get
{
if(SearchResults.SelectedItem!=null)
{
myVM.SuburbText=SearchResults.SelectedItem.TextProperty;
}
else if(myVM.SuburbText="")
{
myVM.SuburbText="Please write...";
}
return myVM.SuburbText;
}
set
{
if(SearchResults.SelectedItem==null)
{
myVm.SuburbText=value;
//with value you may create Suburb object ? and set as Selected.
//Depending on what you aim. I suggest using SelectedItem & ValueMemberPath
}
}
}
//How did I used this control before
//You can also bind SelectedItem and use ValueMemberPath as shown below.
<sdk:AutoCompleteBox MinimumPopulateDelay="500" MinimumPrefixLength="3"
Populating="AutoCompleteBox_Populating"
SelectedItem="{Binding Path=SELECTEDITEM,Mode=TwoWay}"
ValueMemberPath="DESCRIPTION">