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

MeasureOverride returned NaN

1 Answer 26 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
rllmuk
Top achievements
Rank 1
rllmuk asked on 22 Nov 2011, 10:48 AM
We are using the RichTextBox control to create XAML documents, which are then stored in the database and displayed in a different application. On attempting to retrieve one particular saved document, we are getting the error 'MeasureOverride returned NaN' (see attachment).

Now, previous discussion on this error points to issues with dynamic sizing. The layout of the page the richtextbox is in has explict heights/widths and the control itself is constrained to the size it initializes at. The cell it is in has explict height/width as well.

<telerik:RadRichTextBox x:Name="TxtInfoContent"  Grid.Row="4" Grid.Column="1" Margin="5" AcceptsReturn="True" Height="297" Width="455" MaxHeight="297" MaxWidth="455" />

However, the unique thing about this content is that it is about 200kb due to a particularly large image. The image is larger than the width/height the control is limited to. It loaded into the RichTextBox fine in order to export and save it, it just won't parse back in to it. 

All other XAML docs saved/parsed by the RichTextBox load fine.

Obviously the simple answer is to redo the content with a smaller image, which is fine, but I wouldn't expect the control to crash the entire silverlight application due to this. Any ideas?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 24 Nov 2011, 08:10 PM
Hello Rllmuk,

Thank you for reporting this issue. We agree that a crash in the Silverlight application is not acceptable in such a scenario.
I tried importing and exporting such XAML files, but depending on the version of the controls - the document was either imported/exported or the file was not opened at all. In the latter case, an exception was thrown and handled in the OpenDocumentCommand and a message box was shown saying "The document cannot be opened").
In order to help us identify the cause of the issue, could you specify which version of the controls you are using and perhaps attach a document that illustrates the issue in the support ticket you have opened?
Looking forward to your reply.

Regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
rllmuk
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or