This is a migrated thread and some comments may be shown as answers.

Crash when delete all content in Rich Textbox

2 Answers 88 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
vinay kumar
Top achievements
Rank 1
vinay kumar asked on 31 Jan 2018, 01:59 AM

Hi

 

i am dynamically adding spans to a richtextbox when user click on a button.

 

   foreach (var item in objspanList)
                {
                   
                   
                   this.richTextBox.InsertInline((Telerik.Windows.Documents.Model.Inline)item);
                }

Its getting added as expected.  But when i add couple of times and then try to delete  all , application gets crashed and unhandled exception is thrown. So not sure on the error.

 

Can you please suggest on this.

 

 

 

2 Answers, 1 is accepted

Sort by
0
vinay kumar
Top achievements
Rank 1
answered on 31 Jan 2018, 02:57 AM

The following is the error i am receiving

 

   at Telerik.Windows.Documents.UI.Layers.Revisions.RevisionChangedLinesDecoration.GetLinesWithInlineChanges(HashSet`1 lineInfos)
   at Telerik.Windows.Documents.UI.Layers.Revisions.RevisionChangedLinesDecoration.UpdateUIViewPortOverride(UILayerUpdateContext context)
   at Telerik.Windows.Documents.UI.Layers.DecorationUILayerBase.UpdateViewPort(UILayerUpdateContext context)
   at Telerik.Windows.Documents.UI.DocumentPagePresenter.UpdateUILayersViewPortSize(RectangleF viewPort)
   at Telerik.Windows.Documents.UI.DocumentPagePresenter.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

0
Peshito
Telerik team
answered on 02 Feb 2018, 01:17 PM
Hi,

I tried to reproduce the issue but to no avail. Adding spans dynamically and then deleting all worked and no exceptions were thrown. Could you elaborate more on your scenario. A sample reproducing the issue will help is isolate the problem and provide you with a possible solution.

Regards,
Peshito
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RichTextBox
Asked by
vinay kumar
Top achievements
Rank 1
Answers by
vinay kumar
Top achievements
Rank 1
Peshito
Telerik team
Share this question
or