哪里可以找到带有灰色指令的漂亮文本框?(Where to find the nifty Textbox with the grayed out instruction?)

编程入门 行业动态 更新时间:2024-10-24 02:31:58
哪里可以找到带有灰色指令的漂亮文本框?(Where to find the nifty Textbox with the grayed out instruction?)

登录到msn-messenger时,您可以使用这些漂亮的文本框,以灰色文本显示要键入的内容(用户名,密码)。 一旦你开始输入它就会消失。 使用WPF中的用户控件肯定不难实现,但这种控制/行为是否已经可用?

While logging in to msn-messenger you have these nifty textboxes that show you what to type (username, password) in gray text. Once you start typing it disappears. This surely is not hard to implement using a user control in WPF, but is this control/behaviour already available?

最满意答案

这被称为“水印文本框”。 这是一个代码示例:

http://vistasquad.co.uk/blogs/nondestructive/archive/2009/01/02/wpf-textbox-with-watermark.aspx

This is called a "watermark textbox". Here's a code sample:

http://vistasquad.co.uk/blogs/nondestructive/archive/2009/01/02/wpf-textbox-with-watermark.aspx

更多推荐

使用,WPF,msn-messenger,implement,using,电脑培训,计算机培训,IT培训"/> <meta nam

本文发布于:2023-08-02 19:28:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1379554.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以找到   指令   文本框   灰色   漂亮

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!