如何使用C#创建类似[数据库字段名称]的占位符? [英] How will i create place holders like [database field name] using c#?

查看:91
本文介绍了如何使用C#创建类似[数据库字段名称]的占位符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将如何在MS RB 2.0中创建占位符,以将数据库值(如[database_table_field_name])保存在WPF RichTextBox中.如果我们选择此选项(完全选择且不可编辑),则与其他单词相比,它还会具有单独的上下文菜单.

How will i create place holder like in MS RB 2.0 for holding database values like [database_table_field_name] in WPF RichTextBox. If we select this, fully selected and non editable, also it has separate context menu when compare to other words.

推荐答案

您需要更好地说明自己.您可以使用字符串mashing或regex插入文本,但是如果您想要某种特殊的行为,除了使用字符串类的Replace方法将标记替换为最终文本之外,您还需要编写自己的代码来为您提供那些行为.如果需要帮助,则需要更好地解释您的意思.
You need to better explain yourself. You can insert text with string mashing or regex, but if you want some sort of special behaviour, beyond using the Replace method of the string class to replace the tokens with the final text, then you need to write your own code to give you those behaviours. If you need help, you need to better explain what you mean.


仍然不确定您到底想要什么.我不确定您可以使用富文本框来做到这一点,但是可以使用一系列具有自己的上下文菜单的标签来做到这一点.如果您不需要编辑,请选择Esp.
Still not sure what you want exactly. I am not sure you can do this with a rich text box, but you could do it with a series of labels that have their own context menus. Esp if you don''t need the ability to edit.


这篇关于如何使用C#创建类似[数据库字段名称]的占位符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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