Wednesday, May 18, 2011

The order in which you set properties in XAML should never matter


But it might! This is most definitely unexpected (wrong) behaviour.
Heres what works:
A combobox SelectedItem bound to a string AND ItemsSource bound to a List Of String property
Heres what doesn't work: 
A combobox SelectedItem bound to a string AND ItemsSource bound to a List Of String exposed as a Key's Value in a dictionary property.
Heres what works:
A combobox ItemsSource bound to a List Of String exposed as a Key's Value in a dictionary property AND SelectedItem bound to a string. 

Wierd but as long as it gets the job done. 
Enjoy!

No comments:

Post a Comment