XamlDataProvider: formatProvider is null

3 posts, 0 answers
  1. Art
    Art avatar
    23 posts
    Member since:
    Apr 2015

    Posted 17 Jun 2015 Link to this post

    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. Art
    Art avatar
    23 posts
    Member since:
    Apr 2015

    Posted 17 Jun 2015 Link to this post

    There is a problem with Prism. Some assemblies have to be connected in the library and in the main project. Strange. But it works.
  3. DevCraft banner
  4. Petya
    Admin
    Petya avatar
    975 posts

    Posted 19 Jun 2015 Link to this post

    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
Back to Top