I am evaluating the RichTextBox to view word documents in Silverlight. One of the documents throws the following exception:
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.InvalidCastException: Unable to cast object of type 'Telerik.Windows.Documents.Layout.TableRowLayoutBox' to type 'Telerik.Windows.Documents.Layout.TableLayoutBox'.
at Telerik.Windows.Documents.Layout.TableRowLayoutBox.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.TableLayoutBox.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: 62
Char: 13
Code: 0
URI: http://localhost:61956/
Is this a bug? Any help to resolve this issue will be greatly appreciated. The file I am using is 1.5 megs. Can this be the issue? Is there a max size limit?
I can email the doc file if required (cannot attach doc files to forum post).
Thanks!
Harshu