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

HtmlDataProvider.FormatProvider is null

2 Answers 47 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
WILLIAM
Top achievements
Rank 1
WILLIAM asked on 19 Mar 2014, 04:18 PM
We have recently updgraded to the lastest version of Telerik controls for silverlight and running into a lot of issues.

Before the upgrade, I had this snippet of code, where I'm assuming that by creating the HtmlDataProvider, the FormatProvider was created as well without any additional logic.  I had immediate access to the FormatProvider
HtmlDataProvider = new HtmlDataProvider();
var provider = (HtmlFormatProvider)HtmlDataProvider.FormatProvider;
provider.ExportSettings = new HtmlExportSettings
                       {
                            ImageExportMode = ImageExportMode.UriSource,
                            DocumentExportLevel = DocumentExportLevel.Fragment,
                            StylesExportMode = StylesExportMode.Inline
                       };

Now this same block of code causes a NullReference Exception because FormatProvider is null.

What changed, and how do I fix it?

Thanks

2 Answers, 1 is accepted

Sort by
0
WILLIAM
Top achievements
Rank 1
answered on 19 Mar 2014, 04:39 PM
I figured it out.

I wish you guys would take into consideration the ramifications of things that are major code breakers.  We have a very large application and this instance, along with obsoleting controls, methods, and or properties has caused major problems and great deal of work re-writing a lot of code. I'm on day 4 of implementing this upgrade, and I'm not anywhere near being finished.  My boss is considering pulling the upgrade.

:-(

0
Mihail
Telerik team
answered on 20 Mar 2014, 05:42 PM
Hello William,

Sorry to hear that you have troubles upgrading the version of Telerik UI for Silverlight used in your application. We do our best to avoid breaking changes and only introduce such when absolutely necessary. Additionally, all controls have articles explaining how to deal with such changes, the following one explains the compatibility between different versions of RadRichTextBox: Backward Compatibility.

Regarding the problem you have encountered related to HtmlDataProvider, I'm afraid I was unable to reproduce that. The HtmlFormatProvider is available in HtmlDataProvider and we haven't introduced any changes in this regard. Nevertheless I am glad to hear that you managed to fix the issue.

If you find further obstacles upgrading the controls or you have questions feel free to contact us again.

Regards,
Mihail
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
RichTextBox
Asked by
WILLIAM
Top achievements
Rank 1
Answers by
WILLIAM
Top achievements
Rank 1
Mihail
Telerik team
Share this question
or