XamlParseException on FontFamiliesProvider

4 posts, 1 answers
  1. Matthew
    Matthew avatar
    4 posts
    Member since:
    Aug 2012

    Posted 16 May 2012 Link to this post

    Hey, I've been giving RadRichTextBox a go, and so far it has been the perfect tool for me.

    However, when I import my customized editor to my project, it throws off an error on this particular piece of XAML code:
        <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider" />

    The exception is a XamlParseException, and it goes along the lines of The type 'FontFamiliesProvider' was not found. [Line: 19 Position: 61]. I'm not using the RibbonUI control because I feel it is not suited for my needs; instead I've placed my buttons inside a StackPanel. It works on a separate testing project, but when I plug it in to my existing project... this error gets thrown.

    I've also checked that all the references I need are there, and that they are all of version 2012.1.326.1040 with a runtime version of v2.0.50727. I am just very confused why it works on one project, and not on the other.

    Many thanks!
  2. Answer
    Boby avatar
    586 posts

    Posted 18 May 2012 Link to this post

    Hello Matthew,
    FontFamiliesProvider type is in Telerik.Windows.Controls.RichTextBoxUI assembly, so you should need a reference if you want to use it; another option is to implement one itself - it's just a bind-friendly non-static wrapper around FontManager class, which includes a RegisteredFonts property calling FontManager.GetRegisteredFonts method.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
  4. Fatima
    Fatima avatar
    11 posts
    Member since:
    Oct 2011

    Posted 01 Mar 2013 Link to this post


    I use FontFamiliesProvider in RadRichTextBoxRibbonUI ,but it did not reference the new font i instaled.
    I tried to get the list from :the System.Drawing.Text.InstalledFontCollection but also it reference the default font.the same as FontFamiliesProvider .

    Despite of in Office Word the list of FontFamily get the new font .

    How can i get all font (default and new instaled) ?

  5. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 06 Mar 2013 Link to this post

    Hi Fatima,

    You can use all fonts installed on the client machine in Silverlight. This is also true for RadRichTextBox for Silverlight.

    By default, the following fonts are shown in the UI:

    • Arial;
    • Arial Black;
    • Calibri;
    • Comic Sans MS;
    • Courier New;
    • Georgia;
    • Lucida Sans Unicode;
    • Times New Roman;
    • Trebuchet MS;
    • Verdana.

    In order to have additional fonts show in the drop-downs of RadRichTextBoxRibbonUI and SelectionMiniToolBar, you should register them before the UI is created like this:

    FontManager.RegisterFont(new FontFamily("Tahoma"));

    When it comes to setting the font as default, this can be done as described in this article:

    <telerik:RadRichTextBox Name="editor" Grid.Row="1" FontFamily="Tahoma" FontSize="16" DocumentInheritsDefaultStyleSettings="True" />

    I hope this answers your question.

    All the best,
    Iva Toteva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top