My problem is that when an amount of text, doesn't seem to matter how much is selected in RadRichTextBox, and the font family or size changed, the whole silverlight app seems to lock up. This is the only thing that causes this behaviour currently.
Any insight you can provide is much appreciated.
9 Answers, 1 is accepted
We are not aware of such an issue and I was not able to reproduce it with any of the versions of the control
or our online demo (which uses Q3 2011 - 2011.3.1116).
Could you provide some more details on your set-up? For example, do you have custom UI to apply the font changes and do you bind the content of the document in any way?
Some code snippets or a sample project will be greatly appreciated.
the Telerik team
I have setup a new UserControl with the RadRichtextBox so that i could get the XAML the same in all instances where i use it and not have to copy & paste the XAML into different places.
I then set the content in code via a few methods.
I've included my UserControl XAML and it's code behind below:
Here is my XAML:
Here's how i implement in the classes:
The RichTextControl is only created once and is used everywhere... so i'm starting to think this might be causing the problem.... Not sure why the Control would have a problem with just switching content, though.
Thanks in advance for any suggestions
No change. All that is needed to crash it is a "ctrl+a" and a couple font changes.
I see that there is a newer version, so i'll attempt to update and see if that helps.
The editor still does the same thing, however i've isolated it to a single area that it's doing it in.
I'm getting an error whenever doing a "ctrl+a" + <operation>
for example, even just using ctrl+a to highlight everything and then hitting the delete key to remove all the text from the editor will make it crash.
The error i'm getting is a "Key not found in Dictionary" exception
My code loads up correctly and the only time it crashes is when using the Telerik editor unfortuneately...
Any suggestions are appreciated...
Also, the other 2 areas where i use the telerik editor are fine, and don't have this problem.
We were not able to reproduce the issue.
However, judging from your description, the exception is probably related to the document you are viewing in this particular RadRichTextBox instance. Could you share the content that you are setting in the following method:
so that we can try to reproduce it.
If you could prepare a sample project illustrating the problem, it would be even better.
Looking forward to your reply.
the Telerik team
I've figured out the problem. It related to reuse of the control. apparently, the control does not like being reused and only the content being changed.
I have adjusted my code to make a new control in each section needed and it seems to be working properly now.
Sorry for not updating this sooner.
Thanks for looking into it for me.
Is there a way to capture and read errors that RadRichTextBox might be encountering?
My Silverlight app just stops responding when this happens.
You can debug your application and set it to break on every exception. This can be done in visual studio from the toolbar: Debug -> Exceptions -> Common Language Runtime Exceptions -> check User-unhandled. For command errors, you can handle the CommandError event and retrieve the exception that has occurred from the event args.
You could also pause debugging and see the method that is currently executed, as well as the stacktrace up to that point, in case the hang is due to an endless cycle of sorts.
Once again, it would be easier if you could open a support ticket and attach a repro project, so that we can debug it on our end and find the cause of the problem.
the Telerik team