Floater.HorizontalAlignment Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

Type: System.Windows.HorizontalAlignment

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

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

.NET Framework
Available since 3.0
Return to top
Show: