Compartir por


FlowDocument.FontWeight Propiedad

Definición

Obtiene o establece el peso de fuente de nivel superior para .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 propiedad

Miembro de la FontWeights clase que especifica el peso de fuente deseado. El valor predeterminado viene determinado por el MessageFontWeight valor .

Ejemplos

En el ejemplo siguiente se muestra cómo establecer el FontWeight atributo de un 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>

En el ejemplo siguiente se muestra cómo establecer la FontWeight propiedad mediante programación.

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

Comentarios

Cualquier FontWeight configuración de los elementos secundarios invalida esta configuración de nivel superior.

Información de la propiedad dependency

Elemento Importancia
Campo identificador FontWeightProperty
Propiedades de metadatos establecidas en true AffectsMeasure, , AffectsRender, Inherits

Se aplica a