FlowDocument.FontWeight Propriedade
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém ou define a espessura da fonte de nível superior do 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
Um membro da classe FontWeights que especifica a espessura da fonte desejada. O padrão é determinado pelo valor MessageFontWeight.
O exemplo a seguir 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 FontWeight propriedade 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
Todas FontWeight as configurações em elementos filho substituem essa configuração de nível superior.
Campo Identificador | FontWeightProperty |
Propriedades de metadados definidas como true |
AffectsMeasure, AffectsRender, Inherits |
Produto | Versões |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |