Problem with resizing

6 posts, 0 answers
  1. Andrew
    Andrew avatar
    20 posts
    Member since:
    Mar 2010

    Posted 06 Dec 2010 Link to this post

    I am using RichTextBox to show HTML. It works fine, but when I resize the window (with RichTextBox in it), error shows up:

    Unhandled Error in Silverlight Application
    Code: 4004    
    Category: ManagedRuntimeError       
    Message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
       w System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
       w System.Reflection.RuntimeModule.GetTypes()
       w System.Reflection.Assembly.GetTypes()
       w System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
       w System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
       w System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(ImportDefinition definition)
       w System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
       w System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
       w System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
       w System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
       w System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition)
       w System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part)
       w System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports)
       w System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(ComposablePart part)
       w System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.<>c__DisplayClass2.<Compose>b__0()
       w System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Action action)
       w System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
       w System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch)
       w System.ComponentModel.Composition.CompositionInitializer.SatisfyImports(ComposablePart part)
       w System.ComponentModel.Composition.CompositionInitializer.SatisfyImports(Object attributedPart)
       w Telerik.Windows.Documents.Proofing.DocumentSpellChecker.EnsureDictionariesAreLoaded()
       w Telerik.Windows.Documents.Proofing.DocumentSpellChecker.GetDictionary(CultureInfo culture)
       w Telerik.Windows.Documents.Proofing.DocumentSpellChecker.CheckWordIsCorrect(String word, CultureInfo culture)
       w Telerik.Windows.Documents.Proofing.DocumentSpellChecker.CheckWordIsCorrect(String word)
       w Telerik.Windows.Documents.Proofing.DocumentProofingManager.CheckWordIsCorrect(String word)
       w Telerik.Windows.Documents.Proofing.DocumentProofingManager.UpdateIncorrectWordsList(DocumentPosition fromPosition, DocumentPosition toPosition)
       w Telerik.Windows.Documents.UI.TextDecorations.ProofingErrorsDecoration.<>c__DisplayClass5.<MarkBoxesWithSpellingErrorsAsynch>b__1()
       w Telerik.Windows.Documents.Utils.DelayedExecution.ExecuteAction(Boolean asynch)
       w Telerik.Windows.Documents.Utils.DelayedExecution.Execute(Boolean executeAsynch)
       w Telerik.Windows.Documents.UI.TextDecorations.ProofingErrorsDecoration.MarkBoxesWithSpellingErrorsAsynch(PointF viewOffset, RectangleF viewPort, IList`1 visibleLayoutBoxes)
       w Telerik.Windows.Documents.UI.TextDecorations.ProofingErrorsDecoration.UpdateUIViewPortOverride(PointF viewOffset, RectangleF viewPort)
       w Telerik.Windows.Documents.UI.BoxDecorationBase.UpdateUIViewPort(PointF viewOffset, RectangleF viewPort)
       w Telerik.Windows.Documents.UI.UILayer.UpdateUI()
       w Telerik.Windows.Documents.UI.UILayer.UpdateViewPort(RectangleF viewPort)
       w Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateUILayersViewPortSize(RectangleF viewPort)
       w Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.MeasureOverride(Size availableSize)
       w System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)    
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 08 Dec 2010 Link to this post

    Hi Andrew,

    The exception you are getting is related to MEF (Managed Extensibility Framework), which RadRichTextBox uses internally. It is possible that it gets confused if you have referenced or loaded different versions of some assembly in your Silverlight project(s) but unfortunately we are not able to pinpoint the problem with the information provided.
    You can try cleaning your solution, removing and adding anew the references to the assemblies, even manually deleting the bin folders. If the problem persists, when the exception occurs, you can retrieve the LoaderExceptions property and send the details back to us.
    By all means let us know how it goes.

    Best wishes,
    Iva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Andrew
    Andrew avatar
    20 posts
    Member since:
    Mar 2010

    Posted 09 Dec 2010 Link to this post

    I tried all options (some system assemblies were from older Silverlight) and now I can resize it once. Second time ends with error. I am not able to get any information from LoaderExceptions (error shows only when I run program from VS, but then I can’t attach debugger to see what happened, when I run program from a web browser – it hangs).

  4. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 11 Dec 2010 Link to this post

    Hello Andrew,

    We cannot address the problem until we manage to reproduce it on our side. If you could isolate the issue in a sample demo and send it over in a support ticket, we may be able to help you further.
    Your cooperation on that one would be greatly appreciated.

    Greetings,
    Iva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  5. Nirmala
    Nirmala avatar
    6 posts
    Member since:
    Aug 2010

    Posted 03 Jan 2011 Link to this post

     I ran into same issue and had to add reference to Microsoft.Silverlight.Testing (\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing folder) to get RichTextBox to work smoothly. There are performance issues though. (slow typing)

  6. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 04 Jan 2011 Link to this post

    Hello Nirmala,

    Thank you for your involvement and the valuable feedback.
    Indeed, there is an assembly that depends on Microsoft.Silverlight.Testing in the suite RadControls for Silverlight. That assembly is Telerik.Silverlight.Controls.Test.Common but it has little to do with RadRichTextBox. If you are not using Telerik's testing framkework, you can remove both references from your project.

    Greetings,
    Iva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top