Set Chart Title Font Name

Thread is closed for posting
2 posts, 0 answers
  1. Maher
    Maher avatar
    8 posts
    Member since:
    Nov 2007

    Posted 17 Apr 2009 Link to this post

    I am tying to set the chart title using the line of code shown below

    RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Name =


    however, when I try to compile this code I get error

    Property or indexer 'System.Drawing.Font.Name' cannot be assigned to -- it is read only C:\Test_Prog\Chart\Default.aspx.cs

    Is there a way to set the Char Title's font programmatically?


  2. Dessy
    Dessy avatar
    73 posts

    Posted 21 Apr 2009 Link to this post

    Hi Maher,

    In order to set Font properties of Chart Title programmatically  you should create a new Font object and set as parameters font name and font size
    Here is an example on how to do this:

    RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font =

    new System.Drawing.Font("Arial", 20);


    Hope that helps.

    Kind regards,
    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.
Back to Top