HorizontalAlignment 枚举

定义

指示应在哪里将元素显示在与父元素的已分配布局槽相对的水平轴上。Indicates where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element.

public enum class HorizontalAlignment
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public enum HorizontalAlignment
type HorizontalAlignment = 
Public Enum HorizontalAlignment
继承
HorizontalAlignment
属性

字段

Center 1

与父元素布局槽的中心对齐的元素。An element aligned to the center of the layout slot for the parent element.

Left 0

与父元素布局槽的左侧对齐的元素。An element aligned to the left of the layout slot for the parent element.

Right 2

与父元素布局槽的右侧对齐的元素。An element aligned to the right of the layout slot for the parent element.

Stretch 3

拉伸以填充整个父元素布局槽的元素。An element stretched to fill the entire layout slot of the parent element.

注解

Stretch 是默认的布局行为。Stretch is the default layout behavior.

显式Height设置Width的元素和属性优先于 Stretch 属性值。Element Height and Width properties that are explicitly set take precedence over the Stretch property value.

适用于