RepeatInfo.RepeatDirection 属性

定义

获取或设置一个值,该值指定项是垂直显示还是水平显示。Gets or sets a value that specifies whether the items are displayed vertically or horizontally.

public:
 property System::Web::UI::WebControls::RepeatDirection RepeatDirection { System::Web::UI::WebControls::RepeatDirection get(); void set(System::Web::UI::WebControls::RepeatDirection value); };
public System.Web.UI.WebControls.RepeatDirection RepeatDirection { get; set; }
member this.RepeatDirection : System.Web.UI.WebControls.RepeatDirection with get, set
Public Property RepeatDirection As RepeatDirection

属性值

RepeatDirection 枚举值之一。One of the RepeatDirection enumeration values.

异常

指定的方向不是 RepeatDirection 枚举值之一。The specified direction is not one of the RepeatDirection enumeration values.

注解

使用 " RepeatDirection属性" 指定项的呈现方向。Use the RepeatDirection property to specify the direction that the items are rendered.

备注

显示的列数始终由RepeatColumns属性确定。The number of columns displayed is always determined by the RepeatColumns property.

如果将此属性设置为RepeatDirection.Vertical, 则列表中的项将显示为从上到下、从左到右的列, 直到呈现所有项。If this property is set to RepeatDirection.Vertical, the items in the list are displayed in columns loaded top to bottom, then left to right, until all items are rendered. 例如, 如果RepeatColumns将属性设置为3, 则项显示为三列, 如下表所示。For example, if the RepeatColumns property is set to 3, the items are displayed in three columns, as in the following table.

11 44 77
22 55 88
33 66 99

如果将此属性设置为RepeatDirection.Horizontal, 则列表中的项将以从左到右、从上到下的行显示, 直到呈现所有项。If this property is set to RepeatDirection.Horizontal, the items in the list are displayed in rows loaded left to right, then top to bottom, until all items are rendered. 例如, 如果RepeatColumns将属性设置为3, 则这些项将显示在每个项的各行中, 如下表所示。For example, if the RepeatColumns property is set to 3, the items are displayed in rows of three items each, as in the following table.

11 22 33
44 55 66
77 88 99

适用于

另请参阅