绑定到组合框? [英] Binding to combobox?
本文介绍了绑定到组合框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
我希望我的图表标题绑定到组合框中的所选项目,我该怎么做?.
用所选项目/值作为路径的简单元素绑定不起作用.
代码:
Hello!
I want my chart title to bind to the selected item in a combobox, how do i do this?.
a simple element binding, with selected item/value as a path doesn''t work.
code:
Title="{Binding Path=SelectedItem, ElementName=ComboBoxDetailed}"
谢谢!
thanks!
推荐答案
如果将ComboBoxItem用作Selected Item,则需要设置SelectedItem.Content,然后仅将其绑定.
问候
西拉子(Siraz)
Hi,
If you are using ComboBoxItem as Selected Item then you need to set SelectedItem.Content then only it will Bind.
Regards
Siraz
这篇关于绑定到组合框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文