C1.Silverlight.Chart.5
AnnoCreated Event
Example 

Fires when annotation label was created.
Syntax
'Declaration
 
Public Event AnnoCreated As AnnoCreatedEventHandler
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.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs)
CanvasGets the axis canvas.  
IndexGets the index of annotation label.  
LabelGets or sets the label element.  
ValueGets the axis value that corresponds to the annotation label.  
Remarks
In the event handler it's possible to customize appearance of the label created by default.
Example
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;
    else
      label.Foreground = Brushes.Blue;
  };
See Also

Reference

Axis Class
Axis Members

 

 


Copyright (c) GrapeCity, inc. All rights reserved.