ComponentOne Chart for WPF and Silverlight
C1.WPF.C1Chart Namespace / Axis Class / AnnoCreated Event

In This Topic
    AnnoCreated Event
    In This Topic
    Fires when annotation label was created.
    Public Event AnnoCreated As AnnoCreatedEventHandler
    Dim instance As Axis
    Dim handler As AnnoCreatedEventHandler
    AddHandler instance.AnnoCreated, handler
    public event AnnoCreatedEventHandler AnnoCreated
    Event Data

    The event handler receives an argument of type AnnoCreatedEventArgs containing data related to this event. The following AnnoCreatedEventArgs properties provide information specific to this event.

    (Inherited from System.ComponentModel.CancelEventArgs)
    Gets the axis canvas.  
    Gets the index of annotation label.  
    Gets or sets the label element.  
    Gets the axis value that corresponds to the annotation label.  
    In the event handler it's possible to customize appearance of the label created by default.
    The following code sets color of labels depending on its values.
    chart.View.AxisY.AnnoCreated += (s, e) =>
        var label = (TextBlock)e.Label;
        if (e.Value >= 0)
          label.Foreground = Brushes.Red;
          label.Foreground = Brushes.Blue;
    See Also