FlowDocument.FontWeight Propriedade

Definição

Obtém ou define o peso de fonte de nível superior para o FlowDocument.

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

Valor de Propriedade

Um membro da FontWeights classe que especifica o peso de fonte desejado. O padrão é determinado pelo MessageFontWeight valor.

Exemplos

O exemplo seguinte mostra como definir o FontWeight atributo de um FlowDocument elemento.

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

O exemplo a seguir mostra como definir a propriedade FontWeight programaticamente.

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

Observações

Quaisquer FontWeight definições nos elementos filhos sobrepõem-se a esta definição de topo.

Informação de Propriedade de Dependência

Item Value
Campo identificador FontWeightProperty
Propriedades dos metadados definidas como true AffectsMeasure, AffectsRender, Inherits

Aplica-se a