设置组合框的默认文本 [英] Setting default text for a combo box

查看:160
本文介绍了设置组合框的默认文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一种方法在silverlight中为组合框设置一个占位符值。

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.

推荐答案

请查看此如何显示默认文本 - 选择小组 - 在WPF中的pageload上的组合框中?和此 Silverlight 4 ComboBox - 绑定到可空数据(尝试使用TargetNullValue,但无法正常工作)

这篇关于设置组合框的默认文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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