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

messagebox Default Font

3 Answers 131 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Roohollah
Top achievements
Rank 1
Roohollah asked on 13 Mar 2012, 04:11 PM
Hello 
how do i can change radmessagebox default font?

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 15 Mar 2012, 10:03 AM
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 >>
0
Roohollah
Top achievements
Rank 1
answered on 16 Mar 2012, 09:22 PM
Thanks for answer but i do not understand
please attach sample code that all of ui item in radmessagebox font be "Tahoma"
0
Victor
Telerik team
answered on 21 Mar 2012, 12:45 PM
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 >>
Tags
MessageBox
Asked by
Roohollah
Top achievements
Rank 1
Answers by
Victor
Telerik team
Roohollah
Top achievements
Rank 1
Share this question
or