Floater.HorizontalAlignment 属性

定义

获取或设置一个值,该值指示 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

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

适用于