FlowDocument.FlowDirection Egenskap

Definition

Hämtar eller anger den relativa riktningen för innehållsflödet i en FlowDocument.

public:
 property System::Windows::FlowDirection FlowDirection { System::Windows::FlowDirection get(); void set(System::Windows::FlowDirection value); };
public System.Windows.FlowDirection FlowDirection { get; set; }
member this.FlowDirection : System.Windows.FlowDirection with get, set
Public Property FlowDirection As FlowDirection

Egenskapsvärde

Ett av de FlowDirection värden som anger den relativa flödesriktningen. Standardvärdet är LeftToRight.

Exempel

I följande exempel visas hur du anger attributet för FlowDirection ett FlowDocument element.

<FlowDocumentReader>
  <FlowDocument 
    FlowDirection="LeftToRight"
  >
    <Paragraph>
      The FlowDirection of content typically corresponds to the innate flow direction
      of the language being represented.  Hebrew and Arabic provide examples of
      languages that naturally flow from right-to-left.  English, German, and Russian
      provide examples of languages that naturally flow from left-to-right.
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

I följande exempel visas hur du ställer in FlowDirection-egenskapen programmatiskt.

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));
// Set the content flow direction to left-to-right.
flowDoc.FlowDirection = System.Windows.FlowDirection.LeftToRight;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))
' Set the content flow direction to left-to-right.
flowDoc.FlowDirection = System.Windows.FlowDirection.LeftToRight

Kommentarer

Om du hämtar den här egenskapen returneras den gällande flödesriktningen. Om du anger den här egenskapen flödar innehållet FlowDocument om i den angivna riktningen.

Innehållet FlowDirection motsvarar vanligtvis den medfödda flödesriktningen för det språk som representeras. Hebreiska och arabiska är exempel på språk som naturligt flödar från höger till vänster. Engelska, tyska och ryska är exempel på språk som naturligt flödar från vänster till höger.

Note

Värdet för den här egenskapen ändras inte automatiskt för att matcha det språk som används av operativsystemet. Om du behöver använda ett annat värde måste du ange det själv som standard LeftToRight.

Information om beroendeegenskap

Objekt Value
Identifierarfält FlowDirectionProperty
Metadataegenskaper inställda på true AffectsParentArrange, Inherits

Gäller för