Setting default text for a combo box

淺唱寂寞╮ 提交于 2019-12-12 01:36:06

问题


I'm wondering if there is a way in silverlight to set a placeholder value for a combo box.

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!


回答1:


Have a look at this How to display default text "--Select Team --" in combo box on pageload in WPF? and this Silverlight 4 ComboBox - Binding to Nullable data (tried TargetNullValue but not working as expected)



来源:https://stackoverflow.com/questions/6601421/setting-default-text-for-a-combo-box

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!