FlowDocument.FontStyle Propiedad

Definición

Obtiene o establece el estilo de fuente de nivel superior para FlowDocument.

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

Valor de propiedad

Un miembro de la clase FontStyles que especifica el estilo de fuente deseado. El valor predeterminado viene determinado por el valor de MessageFontStyle.

Ejemplos

En el ejemplo siguiente se muestra cómo establecer el FontStyle 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 propiedad FontStyle 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 FontStyle configuración de los elementos secundarios invalida esta configuración de nivel superior.

Información sobre propiedades de dependencia

Campo identificador FontStyleProperty
Propiedades de metadatos establecidas en true AffectsMeasure, AffectsRender, Inherits

Se aplica a