Export (0) Print
Expand All

Legend.Alignment Property

Gets or sets the alignment of the legend.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

[PersistenceModeAttribute(PersistenceMode.Attribute)]
[BindableAttribute(true)]
public StringAlignment Alignment { get; set; }

Property Value

Type: System.Drawing.StringAlignment
A .NET Framework StringAlignment enumeration value that represents the alignment of the legend. The default value is Near.

The legend can be aligned so that it is Near, Center or Far; its alignment is also affected by the [Docking] property setting.

If the legend is docked to the top or bottom, Near is to the left; if it is docked to the left or right, Near is at the top. The Far property setting is just the opposite, and aligns the legend to the right or the bottom, depending on where it is docked.

Center always centers the legend, either vertically or horizontally.

Setting the Alignment property will have no effect if the Position property is not set to Auto.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft