Aracılığıyla paylaş


FlowDocument.FontStyle Özellik

Tanım

için FlowDocumenten üst düzey yazı tipi stilini alır veya ayarlar.

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

Özellik Değeri

İstenen yazı tipi stilini belirten sınıfın bir üyesi FontStyles . Varsayılan değer tarafından MessageFontStyle belirlenir.

Örnekler

Aşağıdaki örnekte bir FlowDocument öğenin özniteliğinin FontStyle nasıl ayarlanacağı gösterilmektedir.

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

Aşağıdaki örnekte, FontStyle özelliğinin program aracılığıyla nasıl ayarlanacağı gösterilmektedir.

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

Açıklamalar

Alt öğelerdeki tüm FontStyle ayarlar bu üst düzey ayarı geçersiz kılar.

Bağımlılık Özelliği Bilgileri

Öğe Değer
Tanımlayıcı alanı FontStyleProperty
Meta veri özellikleri olarak ayarlandı true AffectsMeasure, AffectsRender, Inherits

Şunlara uygulanır