Hi, Telerik.
When we use the IInsertHyperlinkDialog with empty RadRichTextBox we get an exception (when click on OK button in the dialog):
System.NullReferenceException: [Arg_NullReferenceException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60310.0&File=mscorlib.dll&Key=Arg_NullReferenceException
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.<ShowInsertHyperlinkDialog>b__24(String linkText, HyperlinkInfo linkInfo)
at CommonControls.TextBoxWithToolBar.InsertHyperlinkDialog.InsertHyperlinkDialogClosed(Object sender, WindowClosedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Telerik.Windows.Controls.RadWindow.OnClosed(WindowClosedEventArgs args)
at CommonControls.Controls.Dialogs.ModalDialog.OnClosed(WindowClosedEventArgs args)
at Telerik.Windows.Controls.RadWindow.OnClosed()
at Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost)
at CommonControls.Controls.Dialogs.ModalDialog.OkButton_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)
Is there any workaround to avoid it? Thanks.
When we use the IInsertHyperlinkDialog with empty RadRichTextBox we get an exception (when click on OK button in the dialog):
System.NullReferenceException: [Arg_NullReferenceException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60310.0&File=mscorlib.dll&Key=Arg_NullReferenceException
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.<ShowInsertHyperlinkDialog>b__24(String linkText, HyperlinkInfo linkInfo)
at CommonControls.TextBoxWithToolBar.InsertHyperlinkDialog.InsertHyperlinkDialogClosed(Object sender, WindowClosedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Telerik.Windows.Controls.RadWindow.OnClosed(WindowClosedEventArgs args)
at CommonControls.Controls.Dialogs.ModalDialog.OnClosed(WindowClosedEventArgs args)
at Telerik.Windows.Controls.RadWindow.OnClosed()
at Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost)
at CommonControls.Controls.Dialogs.ModalDialog.OkButton_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)
Is there any workaround to avoid it? Thanks.