Legend.Alignment Property
.NET Framework (current version)
Gets or sets the alignment of the legend.
Assembly: System.Web.DataVisualization (in System.Web.DataVisualization.dll)
<BindableAttribute(True)> <PersistenceModeAttribute(PersistenceMode.Attribute)> Public Property Alignment As StringAlignment
Property Value
Type: System.Drawing.StringAlignmentA .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
Available since 4.0
Available since 4.0
Show: