Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Standard.v4.4 Assembly / Xceed.Chart.Standard Namespace / ChartLabel Class / TextProps Property
Example


In This Topic
    TextProps Property (ChartLabel)
    In This Topic
    Gives you access to the ChartText applied on the label's text.
    Syntax
    'Declaration
     
    <CategoryAttribute("Text")>
    <DescriptionAttribute("Gives you access to the ChartText applied on the label's text")>
    Public Property TextProps As ChartText
    'Usage
     
    Dim instance As ChartLabel
    Dim value As ChartText
     
    instance.TextProps = value
     
    value = instance.TextProps
    [Category("Text")]
    [Description("Gives you access to the ChartText applied on the label's text")]
    public ChartText TextProps {get; set;}
    Remarks
    The TextProps properties HorizontalAlign and VerticalAlign define how the label must position relative to the origin point defined by the HorizontalMargin and VerticalMargin properties. For example when you set the HorizontalAlign to Left the label will on the left side of an imaginary vertical boundary defined by the HorizontalMargin property.
    Example
    The following example positions the label at the upper left corner of the control and changes the font.
    Dim label As ChartLabel =  New ChartLabel() 
    label.Text = "Hello world"
    label.HorizontalMargin = 0
    label.VerticalMargin = 0
    label.TextProps.HorizontalAlign = HorizontalAlign.Left
    label.TextProps.VerticalAlign = VerticalAlign.Top
    label.TextProps.Font = New Font("Arial", 22)
    m_Form.nChartControl1.Labels.Add(label)
    ChartLabel label = new ChartLabel();
    label.Text = "Hello world";
    label.HorizontalMargin = 0;
    label.VerticalMargin = 0;
    label.TextProps.HorizontalAlign = HorizontalAlign.Left;
    label.TextProps.VerticalAlign = VerticalAlign.Top;
    label.TextProps.Font = new Font("Arial", 22);
    m_Form.nChartControl1.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