Roberto Salemi

Roberto Salemi

  • NA
  • 146
  • 141.3k

[WPF] AutoCompleteBox: set parameters from code behind

Mar 30 2015 5:53 AM

Hi,
I'm using AutoCompleteBox from Codeplex.com

I would set some parameters from code behind... 

In XAML, I defined namespace:
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"

After using AutoCompleteBox:
<toolkit:AutoCompleteBox
x:Name="myAutoComplete"
ItemsSource="{Binding Source={StaticResource DomainDataViewModel}, Path=SampleProperties, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Name}"
ValueMemberPath="Name"
ItemTemplate="{StaticResource PropertyBoxItemTemplate}" 
MouseLeave="PropertyAutoCompleteBox_MouseLeave"
>
</toolkit:AutoCompleteBox>

If I would set any parameter from code behind, in my.xaml.cs, I not found myAutoComplete, why?

Thanks.