Title 類別

定義

表示整個圖表影像的標題。Represents a title for the entire chart image.

public ref class Title : System::Windows::Forms::DataVisualization::Charting::ChartNamedElement, IDisposable
public class Title : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement, IDisposable
type Title = class
    inherit ChartNamedElement
    interface IDisposable
Public Class Title
Inherits ChartNamedElement
Implements IDisposable
繼承
實作

備註

類別會封裝Chart控制項標題的所有功能。 TitleThe Title class encapsulates all the functionality of a title for the Chart control. 這個類別是使用根Titles Chart物件的 collection 屬性來公開。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.

  • 使用預先定義TextStyle的, Embed例如Shadow或。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.

建構函式

Title()

初始化 Title 類別的新執行個體。Initializes a new instance of the Title class.

Title(String)

使用指定的標題文字,初始化 Title 類別的新執行個體。Initializes a new instance of the Title class with the specified title text.

Title(String, Docking)

使用指定的標題文字和停駐值,初始化 Title 類別的新執行個體。Initializes a new instance of the Title class with the specified title text and docking value.

Title(String, Docking, Font, Color)

使用指定的標題文字、停駐值、字型和色彩,初始化 Title 類別的新執行個體。Initializes a new instance of the Title class with the specified title text, docking value, font and color.

屬性

Alignment

取得或設定標題的對齊方式。Gets or sets the alignment of the title.

BackColor

取得或設定標題的背景色彩。Gets or sets the background color of the title.

BackGradientStyle

取得或設定標題背景漸層的方向。Gets or sets the orientation for the background gradient of a title. 此外,也會判斷是否使用漸層。Also determines whether a gradient is used.

BackHatchStyle

取得或設定標題的影線樣式。Gets or sets the hatching style for the title.

BackImage

取得或設定標題的背景影像。Gets or sets the background image of the title.

BackImageAlignment

取得或設定標題背景影像的對齊方式。Gets or sets the alignment of the title background image.

BackImageTransparentColor

取得或設定繪製背景影像時,會繪製成透明的色彩。Gets or sets a color that will be drawn as transparent when the background image is drawn.

BackImageWrapMode

取得或設定標題背景影像的繪製模式。Gets or sets the drawing mode for the background image of the title.

BackSecondaryColor

取得或設定標題背景的次要色彩。Gets or sets the secondary color of the title background.

BorderColor

取得或設定標題的框線色彩。Gets or sets the border color of the title.

BorderDashStyle

取得或設定標題的框線樣式。Gets or sets the border style of the title.

BorderWidth

取得或設定標題的框線寬度。Gets or sets the border width of the title.

DockedToChartArea

取得或設定標題所要停駐之 ChartArea 的名稱。Gets or sets the name of the ChartArea where the title will be docked.

Docking

取得或設定決定標題停駐位置的值。Gets or sets a value that determines where the title is docked.

DockingOffset

取得或設定停駐標題位置的正數或負數位移。Gets or sets the positive or negative offset of the docked title position.

Font

取得或設定標題的字型。Gets or sets the font for the title.

ForeColor

取得或設定標題文字的色彩。Gets or sets the color of the title text.

IsDockedInsideChartArea

取得或設定旗標,這個旗標指定標題是否應停駐於 ChartArea 物件內部。Gets or sets a flag that specifies whether the title should be docked within a ChartArea object.

Name

取得或設定 Title 物件的唯一名稱。Gets or sets the unique name of a Title object.

Position

取得或設定 ElementPosition 物件,這個物件可用來取得或設定標題的位置。Gets or sets an ElementPosition object, which can be used to get or set the position of the title.

ShadowColor

取得或設定標題的陰影色彩。Gets or sets the shadow color for the title.

ShadowOffset

取得或設定標題的陰影位移 (以像素為單位)。Gets or sets the shadow offset, in pixels, of the title.

Tag

取得或設定與這個圖表項目關聯的物件。Gets or sets an object associated with this chart element.

(繼承來源 ChartElement)
Text

取得或設定標題的文字。Gets or sets the text for the title.

TextOrientation

取得或設定標題中的文字方向。Gets or sets the orientation of the text in the title.

TextStyle

取得或設定標題的文字樣式。Gets or sets the style of the text for the title.

ToolTip

取得或設定標題的工具提示。Gets or sets the tooltip for the title.

Visible

取得或設定標題的可視性旗標。Gets or sets the visibility flag of the title.

方法

Dispose()

釋放 ChartElement 使用的資源。Releases the resources used by the ChartElement.

(繼承來源 ChartElement)
Dispose(Boolean)

釋放 Title 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the Title and optionally releases the managed resources.

Equals(Object)

判斷指定的 Object 是否等於目前的 ChartElementDetermines whether the specified Object is equal to the current ChartElement.

(繼承來源 ChartElement)
GetHashCode()

傳回特定型別的雜湊函式。Returns a hash function for a particular type.

(繼承來源 ChartElement)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回表示目前 Object 的字串。Returns a string that represents the current Object.

(繼承來源 ChartElement)

適用於