This is a migrated thread and some comments may be shown as answers.

Get Exception While Add RadRichTextBox ?

3 Answers 205 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 13 Jan 2012, 02:33 PM
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>

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 16 Jan 2012, 12:05 PM
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 >>

0
Jose
Top achievements
Rank 1
answered on 08 May 2020, 04:31 PM

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

0
Dimitar
Telerik team
answered on 11 May 2020, 07:26 AM

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.
Tags
RichTextBox
Asked by
Ravi
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Jose
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or