I need to show the user some XML, but formatted nicely (identing, colors etc).
Can I use RichTextEditor for this? If so how (vb.net please!).
I don't need to edit the XML now, but I will need to in future (hence not using a Browser-type control)
Thanks
2 Answers, 1 is accepted
Hi, Ian,
RadSyntaxEditor is the appropriate control for loading XML content and formatting it properly. It is necessary to add the XmlTagger since it is responsible for the syntax-highlighting in the XML programming language. Additional information how to add taggers is available here:
https://docs.telerik.com/devtools/winforms/controls/syntax-editor/features/taggers/overview
I would also recommend you to have a look at our Demo application >> SyntaxEditor examples which are quite useful on this topic. I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Prefect - just choosing the XmlTagger as a currentLanguageEditor, as per your example, makes the XML look really good.
Thanks
This is still a great solution to viewing XML.
It would be even better if I could split the individual tags up a bit.
So for example:
<formatOption elementType="Component" stereotype="connected" attributeName="Alias" sort="1" title="ref" .....
would look like:
<formatOption
elementType="Component" stereotype="connected" attributeName="Alias" sort="1" title="ref"
This is still a great solution to viewing XML.
It would be even better if I could split the individual tags up a bit.
So for example:
<formatOption elementType="Component" stereotype="connected" attributeName="Alias" sort="1" title="ref" .....
would look like:
<formatOption
elementType="Component"
stereotype="connected"
attributeName="Alias"
(etc)
This is only because my lines are quite long, and a little bit hard to see.
Is this possible? Please :-)
Hi, Ian,
As of R1 2023, the RadSyntaxEditor control supports word wrapping which enables users to view all text for a line that normally would have gone outside the viewport horizontally. It is just necessary to set the IsWordWrapEnabled property to true. Additional information is available here: https://docs.telerik.com/devtools/winforms/controls/syntax-editor/features/word-wrap
Could you please share whether this approach would be suitable for you?