WPF ComboBox 默认选中无效

WPF开发当中,我发现ComboBox默认选中逻辑失效了,仔细查找后发现后台逻辑并没有出现问题测试

测试后发如今XAML中,ComBoBox控件的SelectedValue属性须要写在ItemSource以前,默认选中又恢复正常了。spa

<ComboBox SelectedValue="{Binding TypeValue}" ItemsSource="{Binding CmbListItem}" SelectedItem="{Binding CmbSelectItem}" SelectedValuePath="TypeValue" DisplayMemberPath="Member"/>
相关文章
相关标签/搜索