TableItemStyle.HorizontalAlign 屬性

定義

取得或設定儲存格中內容的水平對齊。Gets or sets the horizontal alignment of the contents in a cell.

public:
 virtual property System::Web::UI::WebControls::HorizontalAlign HorizontalAlign { System::Web::UI::WebControls::HorizontalAlign get(); void set(System::Web::UI::WebControls::HorizontalAlign value); };
[System.ComponentModel.Bindable(true)]
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
Public Overridable Property HorizontalAlign As HorizontalAlign

屬性值

HorizontalAlign

其中一個 HorizontalAlign 列舉值。One of the HorizontalAlign enumeration values. 預設為 NotSetThe default is NotSet.

屬性

例外狀況

指定的水平對齊不是其中一個 HorizontalAlign 列舉值。The specified horizontal alignment is not one of the HorizontalAlign enumeration values.

備註

HorizontalAlign 可以使用屬性來指定資料清單控制項在其容器內的水準對齊方式。Use the HorizontalAlign property to specify the horizontal alignment of the data list control within its container. 這個屬性會使用其中一個 HorizontalAlign 列舉值來設定。This property is set with one of the HorizontalAlign enumeration values. 下表列出可能的值。The following table lists the possible values.

Value 描述Description
NotSet 水平對齊未設定。The horizontal alignment is not set.
Left 儲存格的內容會在儲存格內保持對齊。The contents of a cell are left justified within the cell.
Center 儲存格的內容是在資料格的中央。The contents of a cell are centered within the cell.
Right 儲存格的內容在儲存格內靠右對齊。The contents of a cell are right justified within the cell.

這個屬性的值會儲存在 view 狀態中。The value of this property is stored in view state.

適用於

另請參閱