简体   繁体   English

文字框标签控件

[英]TextBox Label Control

I am not worried about whether this is in Winforms or WPF. 我不担心这是Winforms还是WPF。

Is there ANY way at all that I could develop my own user control like the one found in Microsoft Paint, below: 有没有什么办法可以像在Microsoft Paint中那样开发自己的用户控件,如下所示:

替代文字

If you can't see the pic above, it's here: http://img232.imageshack.us/i/txtboxlblctrl.png/ Is there anyway at all I can do something like this in C#? 如果您看不到上面的图片,则在这里: http : //img232.imageshack.us/i/txtboxlblctrl.png/反正我可以在C#中做这样的事情吗?

Thank you 谢谢

Sure you can. 你当然可以。 By developing your own Usercontrol you can do nearly anything. 通过开发自己的Usercontrol,您几乎可以做任何事情。 I think the easiest way would be to use a WPF TextBox and alternate it with a template. 我认为最简单的方法是使用WPF文本框并将其替换为模板。

This [ http://img199.imageshack.us/i/textboxu.png/] is what you get by simply using [ http://img163.imageshack.us/i/stipe.png/] as BorderBrush 您只需将[ http://img163.imageshack.us/i/stipe.png/]作为BorderBrush即可获得此[ http://img199.imageshack.us/i/textboxu.png/]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM