My XAML code looked like this:
In the design view this actually showed the correct selected item, however it didn't work when the app was ran.
Solution
The solution was actually very trivial. If you take a look at my code you'll see that theSelectedItem
property is defined before the ItemSource
property. It came out that the order does matter, so the SelectedItem
should be defined after the ItemSource
.
No comments:
Post a Comment