共用方式為


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 列舉型別的成員,用來指定 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

適用於