[英]Setting default text for a combo box
I'm wondering if there is a way in silverlight to set a placeholder value for a combo box.我想知道 silverlight 中是否有办法为组合框设置占位符值。
The behavior I wish to achieve is such that when the combo box has no selection, a placeholder value is shown.我希望实现的行为是,当组合框没有选择时,会显示一个占位符值。
This value shouldn't be displayed when the user clicks to open the list of values, and if the selected index is cleared, the placeholder value is shown again.当用户单击打开值列表时,不应显示此值,如果清除所选索引,则再次显示占位符值。
Thanks!谢谢!
Have a look at this How to display default text "--Select Team --" in combo box on pageload in WPF?看看这个如何在 WPF 的页面加载的组合框中显示默认文本“--Select Team --”? and this Silverlight 4 ComboBox - Binding to Nullable data (tried TargetNullValue but not working as expected)
和这个Silverlight 4 ComboBox - 绑定到 Nullable 数据(尝试 TargetNullValue 但没有按预期工作)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.