2 posts, 0 answers
    WILLIAM avatar
    134 posts
    Member since:
    Jun 2012

    Posted 28 Apr Link to this post

    We are upgrading to the latest version of telerik (2016.1.217.1050).  All of our existing xaml for the RadRichTextBox is failing.  I've looked through the documentation and it doesn't have a specific example of how to define a TxtDataProvider.

    The exact exception is telling me that the FormatProvider parameter is null and in your demo's, I do not see where you setting the FormatProvider property in the xaml.

    I have the following:

    <UserControl x ...
    <!-- Then, based on an example in your demos, I have -->
    <telerikTxt:TxtDataProvider Name="TxtDataProvider" RichTextBox="{Binding ElementName=uxSearchText}"/>
    <telerik:RadRichTextBox x:Name="uxSearchText">

    But based on the exception, I'm assuming I should have something like this:

    <telerikTxt:TxtDataProvider Name="TxtDataProvider" RichTextBox="{Binding ElementName=uxSearchText}" FormatProvider="SOMETHING SHOULD GO HERE"/>

    Can you provide me with an example of how to define a TxtDataProvider/TxtFormatProvider in xaml?


  2. Boby
    Boby avatar
    586 posts

    Posted 03 May Link to this post

    Hi William,

    We've made a change in 2015 Q1 (listed in release notes as "Setting value to the bound property of a DataProvider can fail silently."), which basically adds one additional null check to reveal some situations which were previously failing silently. 

    I was not able to reproduce the problem locally, but I believe that in your setup something is preventing the normal automatic registration of the TxtFormatProvider (RadRichTextBox uses MEF). You can manually register it by putting the following code somewhere before the XAML initialization:
    DocumentFormatProvidersManager.RegisterFormatProvider(new TxtFormatProvider());

    In case this doesn't help, you could open a support ticket and send us sample project reproducing the issue - this would help us investigate it thoroughly on our side.

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top