HtmlFormatProvider in RadTabControl

2 posts, 0 answers
  1. Michael
    Michael avatar
    1 posts
    Member since:
    Nov 2013

    Posted 15 Apr 2016 Link to this post



    I am trying to get a series of tab RichTextEditors to return formatted text as html markup fragments, and not the fully-qualified HTML doc.  We use this same RichTextEdit elsewhere which honors the formatting settings to return fragments (but not in a tab control), but in the context below, it always returns the default full html doc no matter what.  Originally this was using a resource dictionary, but I inlined the HTMLDataProvider to try to isolate the problem

    <telerik:RadTabControl Style="{DynamicResource TabControlNoHeaderBackground}" ItemsSource="{Binding Disclosures}">
                <TextBlock Text="{Binding DisclosureTypeName}" />
                    <telerik:HtmlDataProvider x:Name="CustomerHtmlDataProvider"
                                              Html="{Binding Content, Mode=TwoWay}"
                                              RichTextBox="{Binding ElementName=TxtDisclosureContent}">
                    <telerik:RadRichTextBox x:Name="TxtDisclosureContent" IsSpellCheckingEnabled="False" />
  2. Mihail
    Mihail avatar
    223 posts

    Posted 20 Apr 2016 Link to this post

    Hello Michael,

    We made some tests to find the source of this issue and it turns out that it is a WPF problem.  In particular, DataTemplate may reset local values set to the dependency property.
    The solution is to use a user control in your data template.

    I hope this information is helpful for you.

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top