When I navigate to a page with the autocomplete dropbox with two-way binding enabled, the dropdown always activates without user intervention.
Even setting IsDropDownOpen = false; in OnNavigatedTo doesn't stop it (probably to early, I should do it after the databind somehow).
This can be easily reproduced with the sample project by adding
<toolkit:AutoCompleteBox VerticalAlignment="Top" ItemsSource="{StaticResource words}" Text="{Binding Txt, Mode=TwoWay}" Margin="0,12"/>
And the following in the code behind:
public partial class AutoCompleteBoxSample : PhoneApplicationPage
{
private static ACTextContext dc = new ACTextContext();
public AutoCompleteBoxSample()
{
InitializeComponent();
this.DataContext = dc;
}
}
public class ACTextContext : INotifyPropertyChanged
{
private string txt;
public string Txt
{
get { return txt; }
set { this.txt = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Txt"));
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
Even setting IsDropDownOpen = false; in OnNavigatedTo doesn't stop it (probably to early, I should do it after the databind somehow).
This can be easily reproduced with the sample project by adding
<toolkit:AutoCompleteBox VerticalAlignment="Top" ItemsSource="{StaticResource words}" Text="{Binding Txt, Mode=TwoWay}" Margin="0,12"/>
And the following in the code behind:
public partial class AutoCompleteBoxSample : PhoneApplicationPage
{
private static ACTextContext dc = new ACTextContext();
public AutoCompleteBoxSample()
{
InitializeComponent();
this.DataContext = dc;
}
}
public class ACTextContext : INotifyPropertyChanged
{
private string txt;
public string Txt
{
get { return txt; }
set { this.txt = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Txt"));
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
}