TIP: XAML Markup & Entities (Dynamic) |
Post Reply |
Author | ||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(1)
Posted: 01 June 2008 at 10:43pm |
|
Hi,
Sometimes you need to insert dynamically generated text from XAML unaware sources (such as user input, log files, etc...). Trying to include this text may cause the markup to be invalid and prevent the CJ controls from displaying the markup properly. To prevent this, you should sanitize all plain-text that you want to add to your markup controls before sending it to the control. Right now I'm using this function and it has been working (although I don't know if the list is exhaustive, so I'd appreciate any input if there are bugs):
I've also added (as a convenience) the conversion of VB NewLines to <LineBreak/> elements to preserve line spacing. To use it (for this example, put a TextBox (Text1) and a CJ Label (Label1) on your form):
Pretty simple & straight-forward, but hopefully it will be of some use to someone! |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
zitz
Senior Member Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(1)
|
|
Thank you! I use '
' instead '<linebreak/>'
For C++, MFC
|
||
Xtreme ToolkitPro v13.1.0, static, VC++6
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |