Label with different font Style

2 posts, 0 answers
  1. Rakesh
    Rakesh avatar
    6 posts
    Member since:
    Aug 2012

    Posted 27 Mar 2012 Link to this post

    I had a requirement to place a value (Eg: 160 (100)) on CharSeriesItem label. I would like to have two different font sizes for the values. Please suggest.

    C# Code:
    ChartSeriesItem item = new ChartSeriesItem();
    TextBlock txt1 = new TextBlock();
            txt1.Text = "Test1"
            txt1.Appearance.TextProperties.Font = new Font("Segoe UI", 9, System.Drawing.FontStyle.Bold);
            item.Label.Add(txt1);

           TextBlock txt2 = new TextBlock("txt2");
           txt2.Text = "Test2";
           txt2.Appearance.TextProperties.Font = new Font("Segoe UI", 7, System.Drawing.FontStyle.Bold);
           item.Label.Add(txt2);

  2. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 29 Mar 2012 Link to this post

    Hello Rakesh,

    What you are trying to achieve is not supported because a single text block is responsible for the label. In case you want to style the label, that style will be applied to the whole text.

    All the best,
    Peshito
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top