The parent of an already removed span cannot be found and a NullReferenceException is thrown while performing Undo. Also, multiple asserts are failing in Debug mode. The stack trace is: UnhandledException: Object reference not set to an instance of an object. UnhandledException: at Telerik.Windows.Documents.Layout.LayoutElement.SetParent(LayoutElement newParent) at Telerik.Windows.Documents.Layout.LayoutBox.EnsureParent() at Telerik.Windows.Documents.Layout.LayoutBox.get_Parent() at Telerik.Windows.Documents.Layout.LayoutBox.get_ValidParent() at Telerik.Windows.Documents.WordPositionHandler.GetParentHandler() at Telerik.Windows.Documents.DocumentPosition.GetCurrentSectionBox() at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.GetCurrentPage() at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
Some dialogs like ParagraphPropertiesDialog and SectionColumnsDialog have dependency properties for defining the width of the numerics. When creating implicit style, the value of these custom properties results in 0 and they are invisible in the UI.
Workaround: Set the value of the property in the custom style. For paragraph properties dialog:
<Style TargetType="rtb:RadParagraphPropertiesDialog" BasedOn="{StaticResource CustomStyle}" >
<Setter Property="NumericWidth" Value="85"/>
</Style>
Add dialog previewing how the content of the RadRichTextBox would be printed according to the current settings. Workaround: Currently this could be implemented with the public API using separate RadRichTextBox in a window.
Using the microsoft word,In docx document,inserting a shape,and add the text context to the shape,then save.
when radrichtextbox open the file,the program crashed.
In this feature, the existing text is overridden as the user types on it with the "Insert" key is pressed on the keyboard.
Workaround: Track the state of the Insert key and delete before inserting content using the KeyDown and CommandExecuting events:
private void MainDemoControl_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.KeyboardDevice.IsKeyToggled(Key.Insert))
{
this.isInsertKeyPressed = true;
}
else
{
this.isInsertKeyPressed = false;
}
}
private void radRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
if (e.Command is InsertTextCommand && this.isInsertKeyPressed)
{
this.radRichTextBox.Delete(false);
}
}