在textchanged窗口中传递数据 [英] Pass data in window on textchanged

查看:64
本文介绍了在textchanged窗口中传递数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为学期项目设计编辑器/编译器.我设计了词法和语法分析器.一切都完成了

但我想给我的编辑器一些ui/gui效果.我有很多,但没有成功.

任务很简单,我有两个控件的窗口.

i m designing a editor/compiler for semester project. i have designed the lexical and syntax analyzer. Everything has been accomplished

but i want to give some ui/gui effect to my editor. i have this a lot but no success.

the task is simple i have window with two controls.

---------------------------------
|           |                   |
|           |                   |
| Part A    |                   |
| want to   |     Part B        |
| display   |     Editor        |
| class,prop|                   |

---------------------------------



我要应用的技巧是
当我输入[class,property,delegate,int,long等]及其各自的标识符时.我希望它们与用户制作的图标一起出现在A部分中(在任何软件中设计).

例子



the trick what i want to apply is
when i type , [ class , property , delegate ,int , long etc ] with their respective identifier . i want them to appears in Part A with user made icons (designed in any software).

example

---------------------------------------------------
| [icon] Math      |   class Math {                |
|   [icon] a       |          int a;               |
|                  |                               |
|                  |                               |
|                  |                               |
|                  |                               |
---------------------------------------------------



你们可以指导我还是给我介绍一些学习链接.
如何获得这种效果

B部分=富文本框
A部分=我不确定这里要做什么(我使用了不同的逻辑,但是失败了)
我已经在Windows Form和WPF中设计了我的应用程序.
我喜欢在WPF



can you guys guide me or refer me some link to study.
how to get this effect

Part B = Rich Text Box
Part A = i m unsure what to take here ( i have used different logics but failed )
i have designed my app in both Windows Form and WPF.
love to apply this effect in WPF

推荐答案

中应用此效果.我不同意Wayne的想法,我相信您需要此编辑器复制一些文本,如果可以的话从ListView复制项目,然后我怀疑应付文字以及图像.

我建议您使用XSLT在该区域显示HTML代码.我尚未准备好代码,但是您可以搜索XSLT(XSL转换,它会将代码自动转换为html,您可以在其中使用预定义的图标(需要保存在目录中).

希望这对您有用.

问候
Rushi
I don''t agree with idea of Wayne, I believe you need this editor to copy some text, now if you will copy items from ListView then i doubt about coping image along with text.

I would suggest you to display HTML code in that area with use of XSLT. I don''t have code ready but you can search for XSLT (XSL Transformation which it self converts your code to html where you can use predefine icons (need to save on your directory).

Hope this is useful to you.

Regards
Rushi


我将为A部分使用WPF ListView,然后可以使用DataTemplates显示正确的图标,具体取决于B部分中所选的项目是类,方法还是属性等.网上有很多教程显示了如何执行此操作. [
I would use a WPF ListView for Part A, then you could use DataTemplates to display the right icons depending on whether the selected item in Part B is a class, method or property etc. There are plenty of tutorials on the net showing how to do this. This[^] tutorial shows you pretty much what you are looking for.

Hope this helps


这篇关于在textchanged窗口中传递数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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