标准文本框中的样式化xml标签 [英] Styled xml tags in standard text box

查看:115
本文介绍了标准文本框中的样式化xml标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

有谁知道如何使用c#对在winforms的普通文本框中找到的xml标签执行样式设置?

例如:

原始xml文本:

Hi all,

Does anyone know how to perform styling to xml tags found in a normal textbox in winforms using c#?

example:

original xml text:

< customerDetails> < companyName> Company < /companyName>< /customerDetails>



显示为:



to be shown as:

<customerDetails>
   <companyName> Company </companyName>
</customerDetails>

推荐答案

最好使用RichTextBox而不是使用标准文本框

http://social.msdn.microsoft.com /forums/zh-CN/winforms/thread/5192ddf3-c1c8-4ef8-ad4d-25b80bec8f75/ [
Better to use RichTextBox rather than using standard text box

http://social.msdn.microsoft.com/forums/en-US/winforms/thread/5192ddf3-c1c8-4ef8-ad4d-25b80bec8f75/[^]


感谢您的帮助Damith Weerasinghe

但是我在
用于语法高亮显示的彩色文本框中找到了解决方案 [ ^ ]
Thanks for the help Damith Weerasinghe

but I found a solution here Fast Colored TextBox for Syntax Highlighting[^]


这篇关于标准文本框中的样式化xml标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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