MeasureOverride returned NaN

2 posts, 0 answers
  1. rllmuk
    rllmuk avatar
    1 posts
    Member since:
    Jun 2011

    Posted 22 Nov 2011 Link to this post

    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.
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 24 Nov 2011 Link to this post

    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 >>

Back to Top