Bagikan melalui


FlowDocument.FlowDirection Properti

Definisi

Mendapatkan atau mengatur arah relatif untuk aliran konten dalam 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

Nilai Properti

Salah FlowDirection satu nilai yang menentukan arah alur relatif. Defaultnya adalah LeftToRight.

Contoh

Contoh berikut menunjukkan cara mengatur FlowDirection atribut FlowDocument elemen.

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

Contoh berikut menunjukkan cara mengatur properti FlowDirection secara terprogram.

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

Keterangan

Mendapatkan properti ini mengembalikan arah alur yang saat ini efektif. Mengatur properti ini menyebabkan konten FlowDocument aliran ulang ke arah yang ditunjukkan.

Konten FlowDirection biasanya sesuai dengan arah alur bawaan bahasa yang diwakili. Bahasa Ibrani dan Arab adalah contoh bahasa yang secara alami mengalir dari kanan ke kiri. Bahasa Inggris, Jerman, dan Rusia adalah contoh bahasa yang secara alami mengalir dari kiri ke kanan.

Nota

Nilai properti ini tidak diubah secara otomatis agar sesuai dengan bahasa yang digunakan oleh sistem operasi. Jika Anda perlu menggunakan nilai yang berbeda maka default , LeftToRightAnda harus menentukannya sendiri.

Informasi Properti Dependensi

Item Nilai
Bidang pengidentifikasi FlowDirectionProperty
Properti metadata diatur ke true AffectsParentArrange, Inherits

Berlaku untuk