I'm using telerik for WP in my project, but seems there is some problem with RadMessageBox font size (see attachment). Text "Are you sure you want to delete the project with its content?" is much to small.
Sample code is taken from Examples:
RadMessageBox.Show("Delete project", MessageBoxButtons.YesNo, "Are you sure you want to delete the project with its content?", "Delete content");
It's WP 7.1 application. Version of libraries: 2011.3.1026.2040
Any ideas why?
regards
6 Answers, 1 is accepted
Thank you for writing.
I am afraid that I could not reproduce the small font size. I pasted the code you provided and the text looks normal.
Please post a support ticket and attach a small sample application that demonstrates this issue so that I can assist you.
I am looking forward to your reply.
Victor
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

I've found the problem.
The problem occurs when I'm using Microsoft.Phone.Controls.Toolkit with your libraries.
On Screen1.png you got proper messagebox when Toolkit isn't used.
On Screen2.png it's messagebox with Toolkit.
That's because i'm using Toolkit transitions. Seems like when I change
RootFrame = new PhoneApplicationFrame();
to
RootFrame = new TransitionFrame();
It's in private void InitializePhoneApplication() method in App.xaml.cs the problem occurs.
Any ideas how to avoid this problem?
regards
Thank you for the clarification.
We are aware that the Silverlight Toolkit does some application wide modifications which are not always appropriate. What most likely happens is that they are defining a default style for ContentControl or TextBlock.
Try setting your own default style for each of these controls on your page, this should override the toolkit styles.
Another thing you can do is to declare this style for RadMessageBox in your Page's resources:
<
Style
TargetType
=
"telerikMessageBox:RadMessageBoxControl"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerikMessageBox:RadMessageBoxControl"
>
<
Border
Padding
=
"12"
Background
=
"{StaticResource PhoneChromeBrush}"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
ContentControl
x:Name
=
"PART_Title"
HorizontalContentAlignment
=
"Left"
FontSize
=
"{StaticResource PhoneFontSizeLarge}"
FontFamily
=
"{StaticResource PhoneFontFamilySemiBold}"
Margin
=
"{StaticResource PhoneMargin}"
/>
<
ContentControl
Grid.Row
=
"1"
HorizontalContentAlignment
=
"Left"
x:Name
=
"PART_Message"
FontSize
=
"{StaticResource PhoneFontSizeNormal}"
Margin
=
"12, 12, 12, 24"
/>
<
CheckBox
x:Name
=
"PART_CheckBox"
Grid.Row
=
"2"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Bottom"
/>
<
ContentControl
Grid.Row
=
"3"
x:Name
=
"PART_ButtonsContainer"
HorizontalContentAlignment
=
"Stretch"
>
<
ContentControl.ContentTemplate
>
<
DataTemplate
>
<
StackPanel
x:Name
=
"PART_ButtonsPanel"
Orientation
=
"Horizontal"
>
</
StackPanel
>
</
DataTemplate
>
</
ContentControl.ContentTemplate
>
</
ContentControl
>
</
Grid
>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
You will also need this namespace declaration:
xmlns:telerikMessageBox="clr-namespace:Telerik.Windows.Controls.MessageBox;assembly=Telerik.Windows.Controls.Primitives"
Please write again if you need further assistance. Best wishes,
Victor
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

regards
Jakub Florczyk

Hi Victor,
Could you suggest how to change the font size of RadMessageBox for winform application using C#?
Thanks,
Peter
Just to confirm, are you asking for UI for Winforms' RadMessageBox? Although this is the forum for Windows Phone controls (UI for Windows Phone 7), I can provide you with the answer.
//change the title bar font
RadMessageBox.Instance.FormElement.TitleBar.Font =
new
Font(
"Arial"
, 12);
foreach
(Control ctrl
in
RadMessageBox.Instance.Controls)
{
if
(ctrl
is
RadLabel)
{
//change the main text font
ctrl.Font =
new
System.Drawing.Font(
"Tahoma"
, 22);
}
if
(ctrl
is
RadButton && ctrl.Name ==
"radButton1"
)
{
//change the button font
ctrl.Font =
new
System.Drawing.Font(
"Consolas"
, 12);
}
}
RadMessageBox.Show(
"My RadMessageBox"
);
In the future, if you have any further questions regarding the UI for Winforms controls, here is the UI for Winforms Forums and you can also open a support ticket here.
Thank you for contacting Support and for choosing Telerik by Progress!
Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress