messagebox Default Font

4 posts, 0 answers
  1. Roohollah
    Roohollah avatar
    2 posts
    Member since:
    Nov 2010

    Posted 13 Mar 2012 Link to this post

    Hello 
    how do i can change radmessagebox default font?
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 15 Mar 2012 Link to this post

    Hi Roohollah,

    RadMessageBox has title and message ui elements inside it which have specific fonts sizes set. If you need to modify the fonts or the font sizes you can create a new control template for the RadMessageBoxControl class.
    In order to avoid writing it from scratch you can copy the default RadMessageBoxControl style and modify its control template.
    You can do this by extracting the style from the Telerik.Windows.Controls.Primitives.dll assembly with the reflector tool. The themes are located in a Resources folder inside the assembly.

    You can also use the control template from this help article.
    The special namespace looks like this:

    xmlns:special="clr-namespace:Telerik.Windows.Controls.MessageBox;assembly=Telerik.Windows.Controls.Primitives"

    Write again if have other questions.

    Regards,
    Victor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Roohollah
    Roohollah avatar
    2 posts
    Member since:
    Nov 2010

    Posted 16 Mar 2012 Link to this post

    Thanks for answer but i do not understand
    please attach sample code that all of ui item in radmessagebox font be "Tahoma"
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 21 Mar 2012 Link to this post

    Hi Roohollah,

    Here is where you can download the .net reflector tool. Once you have it installed, double click on the primitives assembly and it should open in reflector. If it does not open, right-click on the assembly and choose Open With from the windows menu and choose reflector (you may have to browse for the executable). After the assembly is open, look at the tree view on the left, select the primitives assembly and drill down to the resources folder. All themes are in the Telerik.Windows.Controls.Primitives.g.resources file. You are looking for the themes/messagebox.xaml file.

    Regards,
    Victor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top