Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Title Class
Collapse the table of content
Expand the table of content

Title Class

.NET Framework 4.6 and 4.5

Represents a title for the entire chart image.

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

public class Title : ChartNamedElement, IDisposable

The Title type exposes the following members.

Public methodTitle()Initializes a new instance of the Title class.
Public methodTitle(String)Initializes a new instance of the Title class with the specified title text.
Public methodTitle(String, Docking)Initializes a new instance of the Title class with the specified title text and docking value.
Public methodTitle(String, Docking, Font, Color)Initializes a new instance of the Title class with the specified title text, docking value, font and color.

Public propertyAlignmentGets or sets the alignment of the title.
Public propertyBackColorGets or sets the background color of the title.
Public propertyBackGradientStyleGets or sets the orientation for the background gradient of a title. Also determines whether a gradient is used.
Public propertyBackHatchStyleGets or sets the hatching style for the title.
Public propertyBackImageGets or sets the background image of the title.
Public propertyBackImageAlignmentGets or sets the alignment of the title background image.
Public propertyBackImageTransparentColorGets or sets a color that will be drawn as transparent when the background image is drawn.
Public propertyBackImageWrapModeGets or sets the drawing mode for the background image of the title.
Public propertyBackSecondaryColorGets or sets the secondary color of the title background.
Public propertyBorderColorGets or sets the border color of the title.
Public propertyBorderDashStyleGets or sets the border style of the title.
Public propertyBorderWidthGets or sets the border width of the title.
Public propertyDockedToChartAreaGets or sets the name of the ChartArea where the title will be docked.
Public propertyDockingGets or sets a value that determines where the title is docked.
Public propertyDockingOffsetGets or sets the positive or negative offset of the docked title position.
Public propertyFontGets or sets the font for the title.
Public propertyForeColorGets or sets the color of the title text.
Public propertyIsDockedInsideChartAreaGets or sets a flag that specifies whether the title should be docked within a ChartArea object.
Public propertyNameGets or sets the unique name of a Title object. (Overrides ChartNamedElement.Name.)
Public propertyPositionGets or sets an ElementPosition object, which can be used to get or set the position of the title.
Public propertyShadowColorGets or sets the shadow color for the title.
Public propertyShadowOffsetGets or sets the shadow offset, in pixels, of the title.
Public propertyTagGets or sets an object associated with this chart element. (Inherited from ChartElement.)
Public propertyTextGets or sets the text for the title.
Public propertyTextOrientationGets or sets the orientation of the text in the title.
Public propertyTextStyleGets or sets the style of the text for the title.
Public propertyToolTipGets or sets the tooltip for the title.
Public propertyVisibleGets or sets the visibility flag of the title.

Public methodDispose()Releases the resources used by the ChartElement. (Inherited from ChartElement.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the Title and optionally releases the managed resources. (Overrides ChartElement.Dispose(Boolean).)
Public methodEqualsDetermines whether the specified Object is equal to the current ChartElement. (Inherited from ChartElement.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns a hash function for a particular type. (Inherited from ChartElement.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current Object. (Inherited from ChartElement.)

The Title class encapsulates all the functionality of a title for the Chart control. This class is exposed using the Titles collection property of the root Chart object.

There can be any number of titles for an entire chart image.

Titles are able to:

  • Be docked and aligned or custom-positioned.

  • Be displayed inside or outside the plotted chart areas.

  • Use a predefined TextStyle such as Embed or Shadow.

  • Use hatching, gradient colors and background images.

  • Be sized and positioned anywhere within the chart image.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

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