FlowDocument.FontWeight FlowDocument.FontWeight FlowDocument.FontWeight FlowDocument.FontWeight Property


FlowDocument のトップレベルのフォントの太さを取得または設定します。Gets or sets the top-level font weight for the FlowDocument.

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


目的のフォントの太さを指定する FontWeights クラスのメンバー。A member of the FontWeights class that specifies the desired font weight. 既定値は、MessageFontWeight 値で決定されます。The default is determined by the MessageFontWeight value.

要素の属性FontWeightを設定する方法を次の例に示します。 FlowDocumentThe following example shows how to set the FontWeight attribute of a FlowDocument element.

    FontFamily="Century Gothic"
      Any font settings on this paragraph would override the font settings
      for the FlowDocument.

次の例では、プログラムをFontWeight使用してプロパティを設定する方法を示します。The following example shows how to set the FontWeight property programmatically.

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


FontWeight要素の設定は、この最上位レベルの設定よりも優先されます。Any FontWeight settings on child elements override this top-level setting.

依存プロパティ情報Dependency Property Information

識別子フィールドIdentifier field FontWeightProperty
メタデータプロパティがに設定されるtrueMetadata properties set to true AffectsMeasureAffectsRenderInheritsAffectsMeasure, AffectsRender, Inherits