Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I show formatted and colored XML in a C# application?

Posted on 2009-03-31
5
Medium Priority
?
438 Views
Last Modified: 2013-11-26
I currently have a textbox in my app that is used to display XML.  As you can imagine, the displayed XML doesn't look very nice.  I want to add color to my display (similar to what you'd get if you displayed XML in any XML viewer or from within Visual Studio).  Additional formatting would be nice, but isn't required.  What is the simplest control or method for doing this?
0
Comment
Question by:NewDawn
  • 2
  • 2
5 Comments
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 24032825
You might be able to embed an Internet Explorer WebBrowser in your form, though I'd guess that was read-only...
0
 
LVL 30

Expert Comment

by:anarki_jimbel
ID: 24032895
If you just want to display - the easies method I believe is to use a web browser. You may apply a transformation style and you'll get nicely formatted colored xml. I can give you the solution.

However if you need to edit your xml the task is probably a bit more tricky. Not sure at the moment.
0
 

Author Comment

by:NewDawn
ID: 24033078
I need the XML to be editable.
0
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 2000 total points
ID: 24033246
I would Google around for a .Net XML WinForm control.  Looks like there might be one included in SharpDevelop, which is free.
0
 
LVL 30

Expert Comment

by:anarki_jimbel
ID: 24034158
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question