HorizontalAlign Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the horizontal alignment of items within a container.
public enum class HorizontalAlign
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.HorizontalAlignConverter))]
public enum HorizontalAlign
[]
type HorizontalAlign =
Public Enum HorizontalAlign
- Inheritance
- Attributes
Fields
| Name | Value | Description |
|---|---|---|
| NotSet | 0 | The horizontal alignment is not set. |
| Left | 1 | The contents of a container are left justified. |
| Center | 2 | The contents of a container are centered. |
| Right | 3 | The contents of a container are right justified. |
| Justify | 4 | The contents of a container are uniformly spread out and aligned with both the left and right margins. |
Examples
The following example shows how setting the HorizontalAlign property of a Panel control changes the horizontal alignment for the text of a Label control that is contained by the Panel control.
<%@ Page Language="C#"%>
HorizontalAlign Example
HorizontalAlign Example
<%@ Page Language="VB"%>
HorizontalAlign Example
HorizontalAlign Example
Remarks
The HorizontalAlign enumeration represents the horizontal alignment options for items within a container, such as a TableCell.