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

RichTextBox not rendering in 2020.1.218.45

4 Answers 99 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 25 Feb 2020, 11:28 AM

Hi,

I have a sample project that uses the RadRichTextBox and RadRichTextBoxRibbonUI controls.  I'm using the Office2016 theme with NoXaml binaries.  I was referencing the assemblies directly in the install directory:

  C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Office2016.dll

...and this all worked fine .  I've since run the upgrade wizard to bump up to R1 2020 and this moved everything locally in the lib folder.  Everything works as before with the exception of the RichTextBox, which does not render (the ribbon and other controls all render fine).  If you check Mole you can see the top level element for the RichTextBox but it has no children and the control does not render.

One thing I notice, looking at the R1 2020 version of Office2016.dll in JustDecompile, is that the baml for richtextboxui seems to produce a parser exception:

Current member / type: themes/telerik.windows.controls.richtextboxui.baml
File path: C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Office2016.dll

Product version: 2019.1.118.0
Character '0' was unexpected in string '0'.  Invalid XAML type name.
at MS.Internal.Xaml.Parser.MeScanner.ResolveTypeName(String longName)
at MS.Internal.Xaml.Parser.MeScanner.Read()
at MS.Internal.Xaml.Parser.MePullParser.<P_MarkupExtension>d__9.MoveNext()
at MS.Internal.Xaml.Parser.MePullParser.<P_Value>d__13.MoveNext()

This is not the case for the same baml file in the equivalent R2 2019 assembly, which displays the xaml you'd expect.

Is this a known issue, or am I missing something else?

Many thanks

John

4 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 25 Feb 2020, 12:02 PM

I should also probably mention that I am merging dictionaries as per: 

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RichTextBoxUi.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

0
Tanya
Telerik team
answered on 25 Feb 2020, 02:37 PM

Hi John,

The first thing I noticed is that there are missing dictionaries that should be merged in order for RadRichTextBox to work properly in NoXaml scenario. Here is the full list of resources:

<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Input.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RichTextBoxUI.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.ImageEditor.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Documents.xaml" />

Would you please add the missing ones and let me know if that resolves the issue?

Regards,
Tanya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
John
Top achievements
Rank 1
answered on 25 Feb 2020, 03:33 PM

Excellent.  Good spot, thank you.

It would be great to build this into the tooling - some kind of audit tool that would analyze the Telerik controls in use on a page and then highlight what resources might be missing from the merged dictionaries.

Anyway, thank you very much for your speedy reply and fix.

Best regards

John

0
Tanya
Telerik team
answered on 28 Feb 2020, 11:14 AM

Hi John,

I am glad to hear that everything is now working as expected. Thank you for sharing your feedback - I have forwarded it to the responsible team for further discussion.

Regards,
Tanya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RichTextBox
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or