TableRow.HorizontalAlign Property
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.
Gets or sets the horizontal alignment of the contents in the row.
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
Property Value
One of the HorizontalAlign values. The default value is NotSet
.
- Attributes
Examples
The following example demonstrates how to use the HorizontalAlign property. For a complete, working code example, see the TableRow class overview topic.
// Create a TableItemStyle object that can be
// set as the default style for all cells
// in the table.
TableItemStyle tableStyle = new TableItemStyle();
tableStyle.HorizontalAlign = HorizontalAlign.Center;
tableStyle.VerticalAlign = VerticalAlign.Middle;
tableStyle.Width = Unit.Pixel(100);
' Create a TableItemStyle object that can be
' set as the default style for all cells
' in the table.
Dim tableStyle As New TableItemStyle()
tableStyle.HorizontalAlign = HorizontalAlign.Center
tableStyle.VerticalAlign = VerticalAlign.Middle
tableStyle.Width = Unit.Pixel(100)
Remarks
Use the HorizontalAlign property to specify the horizontal alignment of the contents of the row. The following table lists the possible values.
Horizontal Alignment | Description |
---|---|
NotSet | The horizontal alignment is not set. |
Left | The contents of the row are left justified. |
Center | The contents of the row are centered. |
Right | The contents of the row are right justified. |
Justify | The contents of the row are uniformly spread out and aligned with both the left and right margins. |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기