Print Page | Close Window

HTML Tags in Markup

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=21739
Printed Date: 16 May 2024 at 2:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HTML Tags in Markup
Posted By: KonradJ
Subject: HTML Tags in Markup
Date Posted: 22 June 2013 at 10:08pm
Is there possible to display HTML tags in the markuptext?



Replies:
Posted By: jpbro
Date Posted: 23 June 2013 at 2:04pm
Markup is based on XAML, a different markup language than HTML. There are often matching XAML tags for HTML tags though. For example, HTML <b> is <Bold> in XAML, HTML <table> is <Grid> in XAML, etc...

Can you be more specific about what you need?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: KonradJ
Date Posted: 24 June 2013 at 9:54am
Thank you for your reply.

What I want is to display colored html tags in the reportviewer using the markup language.



Posted By: KonradJ
Date Posted: 27 June 2013 at 8:54am
Not possible?


Posted By: jpbro
Date Posted: 27 June 2013 at 1:39pm
Unfortunately, I'm still not 100% sure what you want to do.

Do you want to translate HTML to XAML and show that in a ReportControl cell?

Do you just want to use XAML markup in a ReportControl cell? If so, make sure to set the EnableMarkup property to TRUE, then use valid XAML strings for you ReportRecordItem.Caption property.

Do you want to detect HTML tags in a string and apply a color to them? If so, I'll leave the detection part to you, but make sure to escape the HTML strings first using the following code:

http://forum.codejock.com/forum_posts.asp?TID=10865" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=10865

Then put your HTMl string in a XAML <TextBlock></TextBlock> tag around, add <Run> tags around where you've detected the HTML tags, and set the Foreground attribute to the color that you want.

Example: <TextBlock><Run Foreground='Red'>&lt;p&gt;</Run>This is a paragraph with the HTML tag colorized.<Run Foreground='Red'>&lt;/p&gt;</Run></TextBlock>

Or do you mean something else entirely? Can you provide any more information/examples of exactly what you want to achieve?



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: KonradJ
Date Posted: 29 June 2013 at 9:22am
Hello.

After checking the forumpost you linked to, that solved my issue. Thanks for your helpSmile



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net