Alignment 枚举

定义

警告

此 API 现已过时。

指定呈现的对象的对齐方式。Specifies the alignment of a rendered object. 此类不能被继承。This class cannot be inherited. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public enum class Alignment
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see https://go.microsoft.com/fwlink/?LinkId=157231.")]
public enum Alignment
type Alignment = 
Public Enum Alignment
继承
Alignment
属性

字段

Center 2

与屏幕的中央对齐。Aligns with the center of the screen. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Left 1

与屏幕的左侧对齐。Aligns with the left of the screen. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

NotSet 0

默认值。Default value. 如果值为 NotSet,则对齐方式从控件样式继承;或者,如果未定义样式,则从控件的父控件继承。If the value is NotSet, then the alignment is inherited from the control's style, or, if the style is not defined, from the control's parent control. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Right 3

与屏幕的右侧对齐。Aligns with the right of the screen. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

注解

Alignment 枚举表示项在其父容器上的水平定位,如面板或窗体。The Alignment enumeration represents the horizontal positioning of an item on its parent container, such as a panel or form. 例如,如果将图像添加到窗体中,则可以将其水平位置设置为与窗体的右侧对齐。For example, if you add an image to a form, you can set its horizontal position to align with the right side of the form.

尽管可以使用脚本语言中的位值,但不能将其与 ASP.NET 一起使用。Although you can use the bit values in scripting languages, you cannot use them with ASP.NET. 例如,面板标记内的 Alignment = "2" 不是有效的语句。For example, Alignment = "2" within a panel tag is not a valid statement. 但在视觉对象C#中,可以使用 this.myPanel.Alignment = 2However, in Visual C#, you can use this.myPanel.Alignment = 2.

适用于