Get Exception While Add RadRichTextBox ?

4 posts, 0 answers
  1. Ravi
    Ravi avatar
    10 posts
    Member since:
    Oct 2012

    Posted 13 Jan 2012 Link to this post

    Hello World 

    I am getting an exception when i am trying to use RadRichTextBox. Control is added to page successfully but when i am trying to load my page it gives me an exception

    Code : 4004
    Category : ManagedRuntimeError
    Message : System.TypeInitizlizationException : The Type initializer for 'Telerik.Windows.Document.UI.Extensibility.RadCompositionInitizlizer' threw..

    it opens the VS debugger 

    please let me know how the solve this kind of prob ASAP. my xaml code is

    <navigation:Page x:Class="PracticeAssignments.Home"
        xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"                
        xmlns:telerikWindowsControls="clr-namespace:Telerik.Windows;assembly=Telerik.Windows.Controls"   
        xmlns:telerikDocuments="clr-namespace:System;assembly=Telerik.Windows.Documents"
        xmlns:telerikData="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"
        xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
        xmlns:telerikRichTextBoxCommands="clr-namespace:Telerik.Windows.Documents.RichTextBoxCommands;assembly=Telerik.Windows.Documents"
        xmlns:telerikRichTextBoxUI="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI;assembly=Telerik.Windows.Controls.RichTextBoxUI"
        xmlns:telerikFormatProRTF="clr-namespace:Telerik.Windows.Documents.FormatProviders.Rtf;assembly=Telerik.Windows.Documents"
         
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
        Title="Home"
        Style="{StaticResource PageStyle}">
     
        <Grid x:Name="LayoutRoot">
            <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" Margin="-54,-8,-62,-22">
                <StackPanel x:Name="ContentStackPanel" VerticalAlignment="Center">
                    <telerik:RadRichTextBox VerticalAlignment="Center" HorizontalAlignment="Center" Width="200"></telerik:RadRichTextBox>
                </StackPanel>
            </ScrollViewer>
        </Grid>
     
    </navigation:Page>
  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    104 posts

    Posted 16 Jan 2012 Link to this post

    Hello Ravi,

    The problem is probably due to a missing reference or wrong version of an assembly.
    Please check those, try deleting bin, obj and rebuilding. A list of all required assembly references can be found here.
    Hope this helps you. 

    Regards,
    Martin
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Jose
    Jose avatar
    1 posts
    Member since:
    Apr 2020

    Posted 08 May in reply to Martin Ivanov Link to this post

    I am encountering a similar error for a wpf application that supports netcoreapp3.1 and net472.  It works when running under net472(Telerik version: 2017.1.222.45) but fails when running necoreapp3.1(Telerik version: 2020.1.218.310).  I removed the bin and obj folders and rebuilt but the error is still there.  

    System.Windows.Markup.XamlParseException
      HResult=0x80131501
      Message='Initialization of 'Telerik.Windows.Controls.RadComboBox' threw an exception.' Line number '419' and line position '10'.
      Source=PresentationFramework

  4. Dimitar
    Admin
    Dimitar avatar
    2892 posts

    Posted 11 May Link to this post

    Hi Jose,

    It seems that the references are missing and the control cannot be initialized. Please note that we have a separate set of assemblies for .NET Core. Make sure that the correct assemblies are referenced in your project. The assemblies for net core are located in the following folder: C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries\NetCore. In addition, their version ends with 310.

    I hope this helps. Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top