本文介绍了[WPF]绑定ComboBox的SelectedValue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我想绑定一个ComboBox的选定值,但它不起作用。
< ComboBox Grid.Column =" 5"宽度= QUOT 35 QUOT; SelectedValue =" {Binding Attribute [Note] .Value}" >
< ComboBoxItem Content =" 0" />
< ComboBoxItem Content =" 1" />
< ComboBoxItem Content =" 2" />
< ComboBoxItem Content =" 3" />
< / ComboBox>
您是否有想法在没有代码的情况下这样做?
谢谢
解决方案
Hello,
i would like to bind the selected value of a ComboBox but it does not work.
<ComboBox Grid.Column="5" Width="35" SelectedValue="{Binding Attribute[Note].Value}" > <ComboBoxItem Content="0" /> <ComboBoxItem Content="1" /> <ComboBoxItem Content="2" /> <ComboBoxItem Content="3" /> </ComboBox>
Have you an idea to do it without code behind ?
Thank you
解决方案
这篇关于[WPF]绑定ComboBox的SelectedValue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!