RadRichTextBox with a small width

2 posts, 0 answers
  1. CarlosLima
    CarlosLima avatar
    47 posts
    Member since:
    May 2010

    Posted 27 Jul 2010 Link to this post

    Hi,

    I try to setup one radRichTextBox with a very small width, but when i try to execute, it gives me a error:

    Webpage error details
     
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
    Timestamp: Tue, 27 Jul 2010 10:14:50 UTC
     
     
    Message: Unhandled Error in Silverlight Application
    Code: 4004   
    Category: ManagedRuntimeError      
    Message: System.UnauthorizedAccessException: Invalid cross-thread access.
       at MS.Internal.XcpImports.CheckThread()
       at System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex, IntPtr constructDO)
       at System.Windows.DependencyObject..ctor()
       at Telerik.Windows.Documents.Model.DocumentElement..ctor()
       at Telerik.Windows.Documents.Model.Inline..ctor()
       at Telerik.Windows.Documents.Model.Span..ctor()
       at Telerik.Windows.Documents.Model.Span..ctor(Span originalSpan)
       at Telerik.Windows.Controls.RadRichTextBox.TrackPreviousStyles()
       at Telerik.Windows.Documents.UI.DocumentPresenterBase.CaretPosition_LocationChanging(Object sender, EventArgs e)
       at Telerik.Windows.Documents.DocumentPosition.OnLocationChanging()
       at Telerik.Windows.Documents.DocumentPosition.CallOnPositionChanging()
       at Telerik.Windows.Documents.DocumentPosition.Reset()
       at Telerik.Windows.Documents.DocumentPosition.RemoveAnchorFromNextFormattingSymbol()
       at Telerik.Windows.Documents.DocumentPosition.RemoveAnchor_EventHandler(Object sender, EventArgs e)
       at Telerik.Windows.Documents.Layout.LayoutBox.OnElementStructureChanged()
       at Telerik.Windows.Documents.Layout.LayoutBox.CallOnElementStructureChanged(Boolean isRemoved)
       at Telerik.Windows.Documents.DocumentStructure.DocumentStructureCollection.ReplaceLayoutBox(LayoutBox boxWithNodeToUpdate, SpanLayoutBox newNodeValue)
       at Telerik.Windows.Documents.Layout.ParagraphLayoutBox.CreateLayoutBoxesFromContent(LayoutBox fromBox, Span span, String text)
       at Telerik.Windows.Documents.Layout.ParagraphLayoutBox.CreateLayoutBoxesFromContent()
       at Telerik.Windows.Documents.Layout.ParagraphLayoutBox.MeasureOverride(SizeF availableSize)
       at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize)
       at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize)
       at Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverride(SizeF availableSize)
       at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize)
       at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize)
       at Telerik.Windows.Documents.Layout.LayoutElement.Arrange(RectangleF finalRect)
       at Telerik.Windows.Documents.Layout.DocumentLayoutBox.ArrangeTask.ArrangeCallback(Object state)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()    
     
    Line: 56
    Char: 13
    Code: 0
    URI: http://localhost:59403/DemoGenericsTestPage.aspx

    The code i want to run is:
    <telerik:RadRichTextBox x:Name="mytextArea1" Width="20"/>

    The version i have is the last one for silverlight (Q2 2010 i think).

    Thanks
  2. Boby
    Admin
    Boby avatar
    595 posts

    Posted 29 Jul 2010 Link to this post

    Hi David Petronzio,

    Thank you for this bug report. I will add this issue in our to-do list for SP1.
    As a workaround, avoid setting RadRichTextBox's Width under 27, or if this is required, set the PageLayout property of the RadDocument to Paged.

    Best wishes,
    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
  3. DevCraft banner
Back to Top