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

RadHtmlPlaceholder Issue

5 Answers 89 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Akila
Top achievements
Rank 1
Akila asked on 18 Jun 2018, 04:22 AM

Hi,

I'm working on a Silverlight program, which is used to display the preview of an email. Once user entered the email and clicked preview button, that message will display as a html content in preview window, which has created using a telerik RadPlaceHolder. But when click the the button it gives the following error. Can someone help me to sort out this issue. Kindly note that I'm silverlight beginner.

 

The invocation of the constructor on type 'Telerik.Windows.Controls.RadHtmlPlaceholder' that matches the specified binding constraints threw an exception. [Line: 9 Position: 77]

 

This is my code

<telerik:RadWindow  x:Class="Mcs.Crm.ReportBursting.Controls.PrintPreview"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             Width="400"
             Height="300" HorizontalAlignment="Center" VerticalAlignment="Center">
    <Grid x:Name="LayoutRoot" Background="White">
        <Border BorderBrush="Black" BorderThickness="1">
            <telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1" Margin="10"/>
        </Border>
    </Grid>
    </telerik:RadWindow >

 

public partial class PrintPreview : RadWindow
    {
        string mHtml;
        
        public PrintPreview()
        {
            InitializeComponent();
        }
        
        public PrintPreview(string html)
        {
            try
            {
                InitializeComponent();
            }
            catch (Exception)
            {
                
                throw;
            }
            
            mHtml = html;
            Loaded += new RoutedEventHandler(Page_Loaded);
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            RadHtmlPlaceholder1.HtmlSource = mHtml;
        }

 

 

5 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 18 Jun 2018, 01:06 PM
Hello Akila,

This error usually appears if there is a missing Telerik dll or the referenced Telerik dlls are of different versions. Can you double check this? And after this Clean/Rebuild the project.

Also, you can find additional information about the error by clicking the View Details link in the exception tooltip that is shown on the line of the error.

I hope that helps.

Regards,
Martin Ivanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Akila
Top achievements
Rank 1
answered on 19 Jun 2018, 01:34 AM

Hi Martin,

Thank you so much for your quick response. Kindly note that I'm not that much familiar with silverlight and telerik controls. Therefore can you please refer the following details and advice me resolve this.

Referenced  Telerik dlls

Telerik.Windows.Controls - v4.0.30319 (2017.1.222.1050)

Telerik.Windows.Controls.ImageEditor - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Controls.Input - v4.0.30319 (v4.0.30319)
Telerik.Windows.Controls.Navigation - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Controls.RibbonView - v4.0.30319 (2017.1.222.1050)
Telerik.windows.controls.richtextboxui - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Data - v4.0.30319 (2017.1.222.1050)
Telerik.windows.documents - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Documents.Core - v4.0.30319 (2017.1.213.1050)
Telerik.Windows.Documents.FormatProviders.Html - v4.0.30319 (2017.1.222.1050)

 

Exception Details

System.Windows.Markup.XamlParseException occurred
  Message=The invocation of the constructor on type 'Telerik.Windows.Controls.RadHtmlPlaceholder' that matches the specified binding constraints threw an exception. [Line: 9 Position: 77]
  LineNumber=9
  LinePosition=77
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at Mcs.Crm.ReportBursting.Controls.PrintPreview.InitializeComponent()
       at Mcs.Crm.ReportBursting.Controls.PrintPreview..ctor(String html)
  InnerException: System.Collections.Generic.KeyNotFoundException
       Message=The given key was not present in the dictionary.
       StackTrace:
            at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
            at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)
       InnerException:

 

Thank you so much !

0
Akila
Top achievements
Rank 1
answered on 19 Jun 2018, 02:37 AM

I Martin,

I've installed the following toolkits. 

Silverlight_5_Toolkit_December_2011.msi

Telerik_UI_for_Silverlight_2017_1_222_Dev.msi

 

Thanks

0
Akila
Top achievements
Rank 1
answered on 20 Jun 2018, 03:01 AM

Hi Martin,

Thank you so much for your quick response. Kindly note that I'm not that much familiar with silverlight and telerik controls. Therefore can you please refer the following details and advice me resolve this

.
Referenced  Telerik dlls
Telerik.Windows.Controls - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Controls.ImageEditor - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Controls.Input - v4.0.30319 (v4.0.30319)
Telerik.Windows.Controls.Navigation - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Controls.RibbonView - v4.0.30319 (2017.1.222.1050)
Telerik.windows.controls.richtextboxui - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Data - v4.0.30319 (2017.1.222.1050)
Telerik.windows.documents - v4.0.30319 (2017.1.222.1050)
Telerik.Windows.Documents.Core - v4.0.30319 (2017.1.213.1050)
Telerik.Windows.Documents.FormatProviders.Html - v4.0.30319 (2017.1.222.1050)

Exception Details
System.Windows.Markup.XamlParseException occurred
  Message=The invocation of the constructor on type 'Telerik.Windows.Controls.RadHtmlPlaceholder' that matches the specified binding constraints threw an exception. [Line: 9 Position: 77]
  LineNumber=9
  LinePosition=77
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at Mcs.Crm.ReportBursting.Controls.PrintPreview.InitializeComponent()
       at Mcs.Crm.ReportBursting.Controls.PrintPreview..ctor(String html)
  InnerException: System.Collections.Generic.KeyNotFoundException
       Message=The given key was not present in the dictionary.
       StackTrace:
            at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
            at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)
       InnerException:

Thank you so much !

0
Accepted
Martin Ivanov
Telerik team
answered on 21 Jun 2018, 07:14 AM
Hello Akila,

I noticed that you already opened a support ticket with the same question and the issue seems to be resolve by enabling the Windowless mode of the Silverlight application. Can you confirm this?

Regards,
Martin Ivanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
HTMLPlaceHolder
Asked by
Akila
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Akila
Top achievements
Rank 1
Share this question
or