WPF组合框奇怪的问题 [英] WPF combo box weird problem
问题描述
我是一个SortedListbox绑定到WPF组合框。一切都很好。当我选择第一个[仅首页]项目的问题happend。的问题是,当选择第一项目之后选择一个新的项的SelectedValue并没有改变。第一项假设的SelectedValue为1和第三项在组合中的SelectedValue为3。如果我选择第一项,然后选择第三项。的SelectedValue remains'1',当'3'的预期。
I am binding a SortedListbox to an WPF combo box. everything was fine. The problem happend when i select the first [only the first] item. The problem is that SelectedValue doesnt change when a new item is selected after selecting first item. Suppose SelectedValue of the first item is '1' and the SelectedValue of third item in the combo is '3'. If i select the first item and then selected the third item. SelectedValue remains'1', when '3' is expected.
1的任何面临类似的问题。
Any 1 faced similar problems.
问候,
约翰。
推荐答案
也许你可以尝试使用IsSynchronizedWithCurrentItem在你的控制。
Maybe you can try to use IsSynchronizedWithCurrentItem on your control.
<ComboBox IsSynchronizedWithCurrentItem="True" />
这篇关于WPF组合框奇怪的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!