This question is locked. New answers and comments are not allowed.
Hi,
I have a RadRichTextBox connected to a RadRichTextBoxRibbonUI.
If I open up a blank document, or an existing document and position the caret at the end of the document and then click on insert link.
I add valid information and click OK in the dialog, I get a null reference exception:
Object reference not set to an instance of an object.
But if I position the caret somewhere else, not at the end of the document it works fine.
Regards,
Håkan
I have a RadRichTextBox connected to a RadRichTextBoxRibbonUI.
If I open up a blank document, or an existing document and position the caret at the end of the document and then click on insert link.
I add valid information and click OK in the dialog, I get a null reference exception:
Object reference not set to an instance of an object.
at Telerik.Windows.Documents.Model.RadDocument.IsInRange(HierarchicalIndex inlineIndex, AnnotationRangeStart rangeStart)
at Telerik.Windows.Documents.Model.RadDocument.GetFieldStart(Inline inline)
at Telerik.Windows.Documents.Model.Inline.get_FieldStart()
at Telerik.Windows.Documents.Model.RadDocument.IsValidPosition(DocumentPosition p)
at Telerik.Windows.Documents.Model.RadDocument.EnsureValidPositionCallback(DocumentPosition p, Func`1 IsMoveForward)
at Telerik.Windows.Documents.DocumentPosition.ResumePositionValidation()
at Telerik.Windows.Documents.Model.RadDocument.ExecuteCommand(CommandBase command, DocumentCommandContext context)
at Telerik.Windows.Controls.RadRichTextBox.InsertHyperlink(HyperlinkInfo hyperlinkInfo, String hyperlinkText, StyleDefinition hyperlinkStyle)
at Telerik.Windows.Controls.RadRichTextBox.InsertHyperlink(HyperlinkInfo hyperlinkInfo, String hyperlinkText)
at Telerik.Windows.Controls.RadRichTextBox.<ShowInsertHyperlinkDialog>b__24(String linkText, HyperlinkInfo linkInfo)
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.OnOkClicked()
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.buttonOK_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
But if I position the caret somewhere else, not at the end of the document it works fine.
Regards,
Håkan