Click here to Skip to main content
15,918,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
C#
---------------------------------
|           |                   |
|           |                   |
| Part A    |                   |
| want to   |     Part B        |
| display   |     Editor        |
| class,prop|                   |

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


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
C#
---------------------------------------------------
| [icon] Math      |   class Math {                |
|   [icon] a       |          int a;               |
|                  |                               |
|                  |                               |
|                  |                               |
|                  |                               |
---------------------------------------------------


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
Posted
Updated 9-Nov-11 7:48am
v2

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
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900