Unhandled Exception MeasureOverride

6 posts, 0 answers
  1. Andrea Ferrari
    Andrea Ferrari avatar
    9 posts
    Member since:
    Apr 2010

    Posted 28 May 2010 Link to this post

    Hi,
    I'm trying to use the RichTextBox editor, but when I add the followind code

    <telerikEditor:RadRichTextBox Grid.Row="1" x:Name="editor" CurrentSpanStyleChanged="Editor_CurrentSpanStyleChanged" CurrentParagraphStyleChanged="Editor_CurrentParagraphPropertyChanged"
    the Layout disappears with the following error:

     

    MeasureOverride returned positive infinity: Telerik.Windows.Documents.Layout.ParagraphLayoutBox  
       at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\LayoutElement.cs:line 1735  
       at Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverride(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\SectionLayoutBox.cs:line 113  
       at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\LayoutElement.cs:line 1812  
       at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\LayoutElement.cs:line 1724  
       at Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverride(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\DocumentLayoutBox.cs:line 205  
       at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\LayoutElement.cs:line 1812  
       at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\Layout\LayoutElement.cs:line 1724  
       at Telerik.Windows.Documents.UI.EditorContentPresenter.MeasureOverride(Size availableSize) in c:\Users\TeamFoundationUser\AppData\Local\Temp\WPF_Scrum\Documents_SL_2010_Q1\Sources\Development\Documents\UI\EditorContentPresenter.cs:line 962  
       at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)  
     
     


    What I've to do?

    Thanks and regards.
    Andrea Ferrari
  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 28 May 2010 Link to this post

    Hi Andrea Ferrari,

    Thank you for reporting this issue.
    In the CTP version RadRichTextBox can not be added to Horizontal/Vertical stack panel or in Grid cell that has Auto size, which is most probably the problem in your case. In the next version we will make sure this is not an issue. However, you should be careful when using this kind of panel with RadRichTextBox, since this way you will loose the UI visualization support, which may lead to poor performance and large memory footprint of your application when editing larger documents.

    We suggest you use the grid panel and specify exact, *, or maximum size of the cells to avoid such problems.
    Let us know if we can help any further with this issue.

    Greetings,
    Mike
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Bob
    Bob avatar
    17 posts
    Member since:
    Jan 2011

    Posted 27 Jun 2011 Link to this post

    Is this still an issue? I'm getting this kind of error in Blend now in the design view with our control that has a RadRichTextBox in it.

    An Exception was thrown
    InvalidOperationException: MeasureOverride returned NzN: Telerik.Windows.Documents.Layout.ParagraphLayoutBox


    And ours is in a Grid Row with a height of star.

    Right now the only way to work in Blends design view is to set the Visibility of the RadRichTextBox to Collapsed.
  5. Boby
    Admin
    Boby avatar
    595 posts

    Posted 30 Jun 2011 Link to this post

    Hi Bob,
    We cannot reproduce the exception in Blend. Could you please open a support ticket and send us attached a sample project that reproduces the issue?

    Regards,
    Boby
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Bob
    Bob avatar
    17 posts
    Member since:
    Jan 2011

    Posted 18 Jul 2011 Link to this post

    Don't think I can do a sample due to time constraints. Is there a better way to get more info out of the Blend error message you think, if it's getting this NaN measuring issue?
  7. Boby
    Admin
    Boby avatar
    595 posts

    Posted 21 Jul 2011 Link to this post

    Hi Bob,
    We still cannot reproduce the exception. If you manage to find more info about it, or find a stable procedure for reproducing it, please get back to us again.

    All the best,
    Boby
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top
DevCraft banner