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

RadForm Title Bar Font

11 Answers 623 Views
TitleBar
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 25 Feb 2009, 10:06 PM
Hi:

I have a problem modifying mi RadForm Title Bar Font. I'm trying to do by design, but it does not apply, i think its because im using Office Silver theme. Anyway, there are form propperties that I could change by code just when the form initializes, like the Icon and Image (thanks for that hit :)   ); but the font it says is Read Only:

Is there a way to change the font just for the RadForm Title Bar?

Thanks

11 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 26 Feb 2009, 09:53 AM
Hi David,

Thank you for the question.

Currently, you cannot change the font of the titlebar at design-time, since this modification will not be serialized. However, you can change the font in the form's constructor. Please refer to the following code snippet:
this.FormElement.TitleBar.Font = new Font("Verdata", 25f, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline); 

If you have additional questions, feel free to contact me.

Regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jeremy Murtishaw
Top achievements
Rank 1
answered on 01 Aug 2009, 05:31 PM
Hello,

I still cannot get this to work. I'm using the Desert Theme and trying to get the titlebar text bolded. Here in my form constructor I've got the following code:

        public Coyote() 
        { 
            this.FormElement.TitleBar.Font = new Font(this.FormElement.TitleBar.Font, FontStyle.Bold); 
            InitializeComponent(); 
        } 

This is not altering the text at all, however.

Please help,
Jeremy
0
Deyan
Telerik team
answered on 03 Aug 2009, 11:14 AM
Hello Jeremy,

Thank you for contacting us. In the new RadForm you can try the following code:

InitializeComponent();  
              
this.FormElement.TitleBar.TitlePrimitive.Font = new Font(this.FormElement.TitleBar.Font, FontStyle.Bold); 

The Desert theme defines a Font setting for the TitleBar and thus overrides yours. However, setting directly the Font property of the TextPrimitive that paints the Title Bar text should work as expected.

I hope this is helpful. I am looking forward to your response.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jeremy Murtishaw
Top achievements
Rank 1
answered on 04 Aug 2009, 04:02 PM
Hi Deyan,

Thanks for the quick response. Your method works perfectly!

Jeremy
0
Alireza
Top achievements
Rank 1
answered on 03 Jan 2015, 06:42 PM
Hi Deyan
I used this code for rad form title bar and correctly work.but still i have problem with menu bar.please help me
Regards
0
Stefan
Telerik team
answered on 05 Jan 2015, 12:23 PM
Hi Alireza,

Can you please provide more information on what precisely you have a problem with - a screen shot will be helpful.

If it is not related to RadForm, it is suggested that you open a new thread in order to avoid mixing different subjects in the same thread.

I am looking forward to your reply.

Sincerely yours,
Stefan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alireza
Top achievements
Rank 1
answered on 06 Jan 2015, 05:18 AM
Hi Stefan
I use radform and radmenu and set them font properties as "tahoma,12f", but at run time when using "Theme", it doesn't display correct.
0
Stefan
Telerik team
answered on 06 Jan 2015, 10:03 AM
Hello Alireza,

Here is the code you can use to set the Font of RadForm and RadMenu:
this.FormElement.TitleBar.TitlePrimitive.Font = new Font("Tahoma", 12, FontStyle.Bold);
this.radMenu1.Font = new Font("Tahoma", 12, FontStyle.Bold);

If for some reason it does not work for you, please provide me with details how to replicate the undesired behavior. Also, please specify which theme are you using.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alireza
Top achievements
Rank 1
answered on 06 Jan 2015, 06:07 PM
Hi Stefan
Thanks for the answer.I've used the code in the program like below
public frmMain()
{
    InitializeComponent();
    this.FormElement.TitleBar.TitlePrimitive.Font = new Font("Tahoma", 12, FontStyle.Bold);
    this.menuMain.Font = new Font("Tahoma", 12, FontStyle.Bold);
}
but Unfortunately, the only change form title.
i use office2010BlueTheme.
Regards
0
Stefan
Telerik team
answered on 07 Jan 2015, 08:53 AM
Hello Alireza,

I can confirm that using the Office2010Blue theme, setting the Font does not work. This is an issue and I have logged it in our feedback portal. We will address it in the upcoming Q1 2015 release. Here is a link to the case: http://feedback.telerik.com/Project/154/Feedback/Details/147744-fix-radmenu-setting-the-font-of-the-control-does-not-take-effect-when-office20.

Your
Telerik Points have been updated for this report. 

Attached you can find a modified version of the theme, where the issue is not present. You can use the theme as described in this article: http://www.telerik.com/help/winforms/themes-using-a-default-theme-for-the-entire-application.html.

Alternatively, you can set the Font of an inner element of the menu item in order for it to take effect:
foreach (RadMenuItem item in radMenu1.Items)
{
    item.Layout.Text.Font = new Font("Tahoma", 12, FontStyle.Bold);
}

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alireza
Top achievements
Rank 1
answered on 07 Jan 2015, 07:54 PM
Hi Stefan
I really thank you for the help you gave me.
your code works.thank you for the follow-up.
Tags
TitleBar
Asked by
David
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Jeremy Murtishaw
Top achievements
Rank 1
Deyan
Telerik team
Alireza
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or