It only happens if I try to apply formatting on a part of the text. Changing the whole Text (after Ctrl + A) I have no crash.
It is a NullReferenceException (thrown twice)
7 Answers, 1 is accepted
I was testing this problem for several hours and I could find out, that the editor toolbar doesnt work properly if I do following:
- Hosting the ribbon bar in a popup.
In your demos you always have your toolbars with font settings on the same "GUI" level as RichTextBox. Try to place it in a popup and test it - maybe you can reproduce the crash.
But what really work, is:
I place a button right next to the richtextbox and made it this way in code behind:
Button1.Click += (s, e) =>
{
Editor.Commands.IncrementFontSizeCommand.Execute();
}
It works. After command fired, font size is increased. Now the ribbon bar works as it should. If I dont click this button and click the telerik ribbon button with this command - app crashes. Normal button with a command binding to "IncrementFontSizeCommand" also crashes.
Please tell me how can I solve it...
I built this line in my c-tor:
((SelectionMiniToolBar)Editor.SelectionMiniToolBar).Visibility = System.Windows.Visibility.Collapsed;
Becouse we didnt want this small popup bar. And this caused all crashes with nullreferenceexception. I would be happy if you implement a visibility property for it that will not crash :)
The SelectionMiniToolBar can be disabled by setting the property IsSelectionMiniToolBarEnabled. More information can be found in our online documentation.
However, we are not aware of any issues with SelectionMiniToolBar and RadRichTextBoxRibbonUI. Please, check that you have added all required assembly references as listed here and remove all unnecessary references. If you are not able to resolve the issue, please provide some further information on the initial set-up, steps to reproduce and the whole stack trace of the exception. It would be best if you could open a support ticket and attach a demo illustrating the problem.
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I encountered this issue now, 3 years later, with Telerik.RadControls.2016.1.112.1050.
We use the editor on two view and it had previously worked, but testing it now caused the editor to crash when changing font attributes such as size, bold or even mouseover on the "change font size" buttons of our RichTextBox Ribbon UI.
Setting IsSelectionMiniToolBarEnabled to False solved the issue.
We are still not aware of such a crash. I tried to reproduce it locally but with no success. Could you please provide some further information on the initial set-up, steps to reproduce and the whole stack trace of the exception? Actually, the best way to approach such a problem is to send us a sample project which demonstrates the issue and a video with exact steps to reproduce.
In the meantime, could you please check if the described behaviour is reproducible in our online demo: Telerik Editor Demo?
Once we are able to reproduce the issue, we will do our best to assist. I am waiting for your reply.
Regards,
Aylin
Telerik