Posted 12 years ago by John.liu
Version: 12.1.0132
Avatar

When I used that code in silverlight with IronPython.

xaml:<app:ButtonEx Content="PageData传值" ActionParam="a=['ss']; \r\n b=Dicationary[str,object]()\r\n" />
IronPython:
code=ButtonEx.ActionParam
editor.Document.InsertText(ActiproSoftware.Text.TextChangeTypes.DuplicateLine, 0,code); 

the result is "a=['ss']; \r\n b=Dicationary[str,object]()\r\n"

why "\r\n" doesn't effect.....

I hople the result is :

a=['ss'];

b=Dicationary[str,object]();

[Modified 12 years ago]

Comments (3)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi, do you mean that you are putting \r\n in your XAML?  If so, XAML doesn't recognize those character sequences as special characters.  Many of our samples show how you can build multi-line document text in XAML.

Or alternatively if you mean you are trying to set it in code, it's likely that your string didn't get the \r\n characters translated to real CR/LF characters.  You should debug the string to make sure.  If you pass real CR/LF characters to SyntaxEditor, it will be converted to a line terminator.


Actipro Software Support

Posted 12 years ago by John.liu
Avatar

ok,

I do it with code like:

code="a=['ss'];[r]b=Dicationary[str,object]() [r]";

code=code.replace('[r]','\r')

then can build multi-line document text in silverlight

Posted 12 years ago by John.liu
Avatar

thanks for your help.

The latest build of this product (v18.1 build 0233) was released 4 years ago, which was after the last post in this thread.