Bagikan melalui


FlowDocument.FontStretch Properti

Definisi

Mendapatkan atau mengatur karakteristik peregangan font tingkat atas untuk FlowDocument.

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

Nilai Properti

Anggota FontStretch kelas yang menentukan karakteristik peregangan font yang diinginkan untuk digunakan. Defaultnya adalah Normal.

Contoh

Contoh berikut menunjukkan cara mengatur FontStretch atribut FlowDocument elemen.

<FlowDocumentReader>
  <FlowDocument
    FontFamily="Century Gothic"
    FontSize="12"
    FontStretch="UltraExpanded"
    FontStyle="Italic"
    FontWeight="UltraBold"
  >
    <Paragraph>
      Any font settings on this paragraph would override the font settings
      for the FlowDocument.
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

Contoh berikut menunjukkan cara mengatur properti FontStretch secara terprogram.

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));
// Set the desired column gap to 10 device independend pixels.
flowDoc.FontFamily = new FontFamily("Century Gothic");
flowDoc.FontSize = 12.0;
flowDoc.FontStretch = FontStretches.UltraExpanded;
flowDoc.FontStyle = FontStyles.Italic;
flowDoc.FontWeight = FontWeights.UltraBold;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))
' Set the desired column gap to 10 device independend pixels.
flowDoc.FontFamily = New FontFamily("Century Gothic")
flowDoc.FontSize = 12.0
flowDoc.FontStretch = FontStretches.UltraExpanded
flowDoc.FontStyle = FontStyles.Italic
flowDoc.FontWeight = FontWeights.UltraBold

Keterangan

Pengaturan apa pun FontStretch pada elemen turunan mengambil alih pengaturan tingkat atas ini.

Informasi Properti Dependensi

Item Nilai
Bidang pengidentifikasi FontStretchProperty
Properti metadata diatur ke true AffectsMeasure, , AffectsRenderInherits

Berlaku untuk