Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Standard.v4.4 Assembly / Xceed.Chart.Standard Namespace / ChartText Class / Font Property
Example


In This Topic
    Font Property
    In This Topic
    Controls the font of the text.
    Syntax
    'Declaration
     
    <CategoryAttribute("General")>
    <DescriptionAttribute("Controls the font of the text.")>
    Public Property Font As Font
    'Usage
     
    Dim instance As ChartText
    Dim value As Font
     
    instance.Font = value
     
    value = instance.Font
    [Category("General")]
    [Description("Controls the font of the text.")]
    public Font Font {get; set;}
    Remarks
    The default font used in 3D Chart for WinForms is Arial 9, but some objects modify may modify it. For example header and footer labels use Arial 12.
    Example
    The following example creates a new label and changes the font
    Dim label As ChartLabel =  New ChartLabel() 
    label.Text = "Hello world"
    label.HorizontalMargin = 0
    label.VerticalMargin = 0
    label.TextProps.HorzAlign = StringAlignment.Near
    label.TextProps.VertAlign = StringAlignment.Near
    label.TextProps.Font = New Font("Arial", 22)
    ChartControl.Labels.Add(label)
    ChartLabel label = new ChartLabel();
    label.Text = "Hello world";
    label.HorizontalMargin = 0;
    label.VerticalMargin = 0;
    label.TextProps.HorzAlign = StringAlignment.Near;
    label.TextProps.VertAlign = StringAlignment.Near;
    label.TextProps.Font = new Font("Arial", 22);
    ChartControl.Labels.Add(label);
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also