Bewerken

Delen via


Floater.HorizontalAlignment Property

Definition

Gets or sets a value that indicates the horizontal alignment for a Floater object.

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

Property Value

A member of the HorizontalAlignment enumeration specifying the horizontal alignment for the Floater. The default is Stretch.

Examples

The following example shows how to set this property.

<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)

Remarks

Dependency Property Information

Identifier field HorizontalAlignmentProperty
Metadata properties set to true AffectsMeasure, AffectsArrange

Applies to