RadForm Title Bar Font

12 posts, 0 answers
  1. David
    David avatar
    14 posts
    Member since:
    Jul 2008

    Posted 25 Feb 2009 Link to this post

    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
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 26 Feb 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jeremy Murtishaw
    Jeremy Murtishaw avatar
    86 posts
    Member since:
    Apr 2009

    Posted 01 Aug 2009 Link to this post

    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
  5. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 03 Aug 2009 Link to this post

    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.
  6. Jeremy Murtishaw
    Jeremy Murtishaw avatar
    86 posts
    Member since:
    Apr 2009

    Posted 04 Aug 2009 Link to this post

    Hi Deyan,

    Thanks for the quick response. Your method works perfectly!

    Jeremy
  7. Alireza
    Alireza avatar
    5 posts
    Member since:
    Nov 2014

    Posted 03 Jan 2015 in reply to Deyan Link to this post

    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
  8. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 05 Jan 2015 Link to this post

    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.
  9. Alireza
    Alireza avatar
    5 posts
    Member since:
    Nov 2014

    Posted 05 Jan 2015 in reply to Stefan Link to this post

    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.
  10. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 06 Jan 2015 Link to this post

    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.

     
  11. Alireza
    Alireza avatar
    5 posts
    Member since:
    Nov 2014

    Posted 06 Jan 2015 in reply to Stefan Link to this post

    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
  12. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 07 Jan 2015 Link to this post

    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.

     
  13. Alireza
    Alireza avatar
    5 posts
    Member since:
    Nov 2014

    Posted 07 Jan 2015 in reply to Stefan Link to this post

    Hi Stefan
    I really thank you for the help you gave me.
    your code works.thank you for the follow-up.
Back to Top
UI for WinForms is Visual Studio 2017 Ready