Annotation Class
TOC
Collapse the table of content
Expand the table of content

Annotation Class

.NET Framework (current version)
 

Defines properties and methods common to all annotations. This is an abstract class.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)


public abstract class Annotation : ChartNamedElement

NameDescription
System_CAPS_protmethodAnnotation()

Initializes a new instance of the Annotation class. This is the default constructor and should not be used.

NameDescription
System_CAPS_pubpropertyAlignment

Gets or sets the content alignment of an annotation.

System_CAPS_pubpropertyAllowAnchorMoving

Gets or sets a flag that specifies whether the end user is allowed to move the annotation anchor using a mouse.

System_CAPS_pubpropertyAllowMoving

Gets or sets a flag that specifies whether the end user is allowed to move an annotation using a mouse.

System_CAPS_pubpropertyAllowPathEditing

Gets or sets a flag that specifies whether the end user is allowed to move the points of a polygon annotation using a mouse.

System_CAPS_pubpropertyAllowResizing

Gets or sets a flag that specifies whether the end user is allowed to resize an annotation using a mouse.

System_CAPS_pubpropertyAllowSelecting

Gets or sets a flag that specifies whether the end user is allowed to select an annotation using a mouse.

System_CAPS_pubpropertyAllowTextEditing

Gets or sets a flag that specifies whether the text in an annotation may be edited when the end user double clicks the text.

System_CAPS_pubpropertyAnchorAlignment

Gets or sets the alignment of an annotation to the anchor point.

System_CAPS_pubpropertyAnchorDataPoint

Gets or sets the data point to which an annotation is anchored.

System_CAPS_pubpropertyAnchorDataPointName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the name of a data point to which an annotation is anchored.

System_CAPS_pubpropertyAnchorOffsetX

Gets or sets the offset from the anchor point for the X position of an annotation.

System_CAPS_pubpropertyAnchorOffsetY

Gets or sets the offset from the anchor point for the Y position of an annotation.

System_CAPS_pubpropertyAnchorX

Gets or sets the X coordinate to which the annotation is anchored.

System_CAPS_pubpropertyAnchorY

Gets or sets the Y coordinate to which the annotation is anchored.

System_CAPS_pubpropertyAnnotationGroup

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the group, if any, to which the annotation belongs.

System_CAPS_pubpropertyAnnotationType

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets an annotation's type name.

System_CAPS_pubpropertyAxisX

Gets or sets the X axis to which an annotation is attached.

System_CAPS_pubpropertyAxisXName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the name of the X axis to which an annotation is attached.

System_CAPS_pubpropertyAxisY

Gets or sets the Y axis to which an annotation is attached.

System_CAPS_pubpropertyAxisYName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the name of the Y axis which an annotation is attached to.

System_CAPS_pubpropertyBackColor

Gets or sets the color of an annotation background.

System_CAPS_pubpropertyBackGradientStyle

Gets or sets the gradient style of an annotation background.

System_CAPS_pubpropertyBackHatchStyle

Gets or sets the hatching style of an annotation background.

System_CAPS_pubpropertyBackSecondaryColor

Gets or sets the secondary color of an annotation background.

System_CAPS_pubpropertyBottom

Gets or sets the bottom boundary of an annotation position.

System_CAPS_pubpropertyClipToChartArea

Gets or sets the name of the chart area to which an annotation is clipped.

System_CAPS_pubpropertyFont

Gets or sets the font to use for the text of an annotation.

System_CAPS_pubpropertyForeColor

Gets or sets the text color of an annotation.

System_CAPS_pubpropertyHeight

Gets or sets the height of an annotation.

System_CAPS_pubpropertyIsSelected

Gets or sets a flag that determines if an annotation is selected.

System_CAPS_pubpropertyIsSizeAlwaysRelative

Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.

System_CAPS_pubpropertyLineColor

Gets or sets the line color of an annotation.

System_CAPS_pubpropertyLineDashStyle

Gets or sets the line style of an annotation.

System_CAPS_pubpropertyLineWidth

Gets or sets the line width of an annotation.

System_CAPS_pubpropertyName

Gets or sets the unique name of an annotation.(Overrides ChartNamedElement.Name.)

System_CAPS_pubpropertyRight

Gets or sets the right boundary position of an annotation.

System_CAPS_pubpropertyShadowColor

Gets or sets the color of an annotation's shadow.

System_CAPS_pubpropertyShadowOffset

Gets or sets the size of an annotation's shadow.

System_CAPS_pubpropertySmartLabelStyle

Gets or sets the smart label style of an annotation.

System_CAPS_pubpropertyTag

Gets or sets an object associated with this chart element.(Inherited from ChartElement.)

System_CAPS_pubpropertyTextStyle

Gets or sets the text style of an annotation.

System_CAPS_pubpropertyToolTip

Gets or sets the tooltip text for an annotation.

System_CAPS_pubpropertyVisible

Gets or sets a flag that specifies whether an annotation is visible.

System_CAPS_pubpropertyWidth

Gets or sets the width, in pixels, of an annotation.

System_CAPS_pubpropertyX

Gets or sets the X coordinate of an annotation.

System_CAPS_pubpropertyY

Gets or sets the Y coordinate of the annotation.

System_CAPS_pubpropertyYAxisName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the name of the Y axis to which an annotation is attached.

NameDescription
System_CAPS_pubmethodBeginPlacement()

Begins the end user placement of an annotation using the mouse.

System_CAPS_pubmethodBringToFront()

Brings an annotation to the front of all annotations.

System_CAPS_pubmethodDispose()

Releases the resources used by the ChartElement.(Inherited from ChartElement.)

System_CAPS_protmethodDispose(Boolean)

Releases unmanaged resources and, optionally, managed resources.(Overrides ChartElement.Dispose(Boolean).)

System_CAPS_pubmethodEndPlacement()

Ends the end user placement of an annotation.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified Object is equal to the current ChartElement.(Inherited from ChartElement.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Returns a hash function for a particular type.(Inherited from ChartElement.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodResizeToContent()

Resizes an annotation according to its content size.

System_CAPS_pubmethodSendToBack()

Sends an annotation to the back of all the annotations.

System_CAPS_pubmethodSetAnchor(DataPoint)

Anchors an annotation to the specified data point.

System_CAPS_pubmethodSetAnchor(DataPoint, DataPoint)

Anchors an annotation to two data points.

System_CAPS_pubmethodToString()

Returns a string that represents the current Object.(Inherited from ChartElement.)

Annotations are commonly used to comment or elaborate on chart elements such as data points. Annotations can also be used to draw custom shapes.

By default, annotations are positioned using relative coordinates, with (0,0) representing the top-left corner, and (100,100) representing the bottom-right corner of the chart image. It is also possible to switch from this relative coordinate system to a system that uses axis values. With an axis coordinate system, X and Y, which represent the position of the top-left corner of an annotation, are set using X axis and Y axis values, instead of values that range from 0-100.

There are two ways to use axis values when you specify the position and size of an annotation:

  • Set the AxisX, AxisY or both of these annotation properties to the AxisX and AxisY property values of a ChartArea object.

  • Use the AnchorDataPoint property to anchor the annotation to a data point. In this case, its positioning is automatically calculated.

All annotations are derived from the Annotation class, which can be used to set attributes common to all Annotation objects, such as color, position, anchoring and so forth.

.NET Framework
Available since 4.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft