Silverlight 4中的RichTextBox - 不能包含大括号的文字还原的XAML [英] Silverlight 4 RichTextBox - can't restore Xaml with text containing curly braces

查看:179
本文介绍了Silverlight 4中的RichTextBox - 不能包含大括号的文字还原的XAML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须使用RichTextBox的为富文本编辑器来创建电子邮件用户Silverlight应用程序。

We have a Silverlight application using the RichTextBox as a rich text editor for the user to create emails.

实际上,我们有我们自己的序列,但本质上我们是保存和恢复XAML中。据我可以告诉它是不可能恢复包含大括号的任何文本。

We actually have our own serializer but essentially we are saving and restoring the Xaml. As far as I can tell it is impossible to restore any text containing curly braces.

您可以通过创建一个RichTextBox然后输入类似{}怪异进去的东西证明这一点很容易。然后把文本框的.XAML财产,在另一个文本框中.XAML属性设置 - kablooie

You can demonstrate this fairly easily by creating a RichTextBox and typing something similar to "{weird}" into it. Then take the .Xaml property of the textbox and set it on the .Xaml property of another textbox - kablooie.

由于我们有我们自己的序列我试图逃避运行元素的文员。这使得没有区别。我试着和放大器更换支架;#123;但是,这并不管用。

As we have our own serializer I have tried escaping the Text member of the Run elements with "". This makes no difference. I've tried replacing the braces with { but that doesn't work either.

推荐答案

在这里认识的问题,并与团队检查。如果运行的启动的用花括号这似乎抛出值异常。我调查。

Acknowledging the issue here and checking with the team. If the Run starts with curly braces it appears to throw a value exception. I'm investigating.

这篇关于Silverlight 4中的RichTextBox - 不能包含大括号的文字还原的XAML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆