Floater.HorizontalAlignment 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示 Floater 对象的水平对齐方式。
public:
property System::Windows::HorizontalAlignment HorizontalAlignment { System::Windows::HorizontalAlignment get(); void set(System::Windows::HorizontalAlignment value); };
public System.Windows.HorizontalAlignment HorizontalAlignment { get; set; }
member this.HorizontalAlignment : System.Windows.HorizontalAlignment with get, set
Public Property HorizontalAlignment As HorizontalAlignment
属性值
HorizontalAlignment 枚举的一个成员,它指定 Floater 的水平对齐方式。 默认值为 Stretch。
示例
下面的示例演示如何设置此属性。
<FlowDocument>
<Paragraph>
<Floater
Name="myFloater"
Width="140"
HorizontalAlignment="Left"
/>
</Paragraph>
</FlowDocument>
Floater flotx = new Floater();
flotx.Name = "myFloater";
flotx.Width = 100;
flotx.HorizontalAlignment = HorizontalAlignment.Left;
Paragraph parx = new Paragraph(flotx);
FlowDocument flowDoc = new FlowDocument(parx);
Dim flotx As New Floater()
flotx.Name = "myFloater"
flotx.Width = 100
flotx.HorizontalAlignment = HorizontalAlignment.Left
Dim parx As New Paragraph(flotx)
Dim flowDoc As New FlowDocument(parx)
注解
依赖项属性信息
标识符字段 | HorizontalAlignmentProperty |
元数据属性设置为 true |
AffectsMeasure, AffectsArrange |