[WPF]绑定ComboBox的SelectedValue [英] [WPF] Bind SelectedValue of ComboBox

查看:82
本文介绍了[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>

您是否有想法在没有代码的情况下这样做?


 


谢谢

解决方案

您好


不是确切答案,但你可能会有所想法..


http: //www.c-sharpcorner.com/UploadFile/mahesh/WPFComboBox10122009073811AM/WPFComboBox.aspx


问候


Zee


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

解决方案

Hello

Not the exact answer , but you may get an idea..

http://www.c-sharpcorner.com/UploadFile/mahesh/WPFComboBox10122009073811AM/WPFComboBox.aspx

Regards

Zee


这篇关于[WPF]绑定ComboBox的SelectedValue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆