LegendTitle Class
An individual legend title.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Charts, DevExpress.Wpf.Charts
Declaration
Related API Members
The following members return LegendTitle objects:
Remarks
The LegendTitle class declares properties that define the common appearance settings of a title which is displayed by a particular legend.
Properties exposed by the LegendTitle class allow you to customize common title attributes, such as:
- the legend title content (TitleBase.Content),
- the alignment of the axis title (TitleBase.HorizontalAlignment),
- the visibility of the axis title (TitleBase.Visible).
- the color and font settings of the title’s text.
Example
To display the legend title, assign a newly created LegendTitle
object to the Legend.Title property. Then, specify the title’s TitleBase.Content property.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-add-a-legend-title-to-a-legend-t377595.
<dxc:Legend>
<dxc:Legend.Title>
<dxc:LegendTitle Content="Area of Countries"/>
</dxc:Legend.Title>
</dxc:Legend>
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LegendTitle class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.