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

XamlDataProvider: formatProvider is null

2 Answers 58 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Art
Top achievements
Rank 1
Art asked on 17 Jun 2015, 06:23 AM

One project always throws this:

if (! TelerikUtils.IsInDesignMode ())
      Telerik.Windows.Documents.Utilities.Guard.ThrowExceptionIfNull<ITextBasedDocumentFormatProvider>(formatProvider, "formatProvider");

And nothing I can do with it.

References to:

Telerik.Windows.Documents;

Telerik.Windows.Documents.FormatProviders.Xaml;

Why is this happening? A new test project works perfect with the same code:

<StackPanel>
    <TextBox x:Name="Source" />
    <t:RadRichTextBox x:Name="PreviewBox" MinHeight="80" />
    <t:XamlDataProvider RichTextBox="{Binding ElementName=PreviewBox}"
    Xaml="{Binding ElementName=Source, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>

 

2 Answers, 1 is accepted

Sort by
0
Art
Top achievements
Rank 1
answered on 17 Jun 2015, 06:39 AM
There is a problem with Prism. Some assemblies have to be connected in the library and in the main project. Strange. But it works.
0
Petya
Telerik team
answered on 19 Jun 2015, 02:47 PM
Hello Art,

This behavior is related to RadRichTextBox's use of MEF. You can take a look at this help article for more information on the matter.

Regards,
Petya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Art
Top achievements
Rank 1
Answers by
Art
Top achievements
Rank 1
Petya
Telerik team
Share this question
or