FlowDocument.Foreground Eigenschap

Definitie

Hiermee haalt u het bestand op of stelt u deze Brush in op de tekstinhoud van de FlowDocument.

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

Waarde van eigenschap

Het penseel dat wordt gebruikt om de tekstinhoud toe te passen. De standaardwaarde is Black.

Voorbeelden

In het volgende voorbeeld ziet u hoe u het Foreground kenmerk van een FlowDocument element instelt.

<FlowDocumentReader>
  <FlowDocument 
    Background="IndianRed"
    Foreground="NavajoWhite"
  >
    <Paragraph>
      This FlowDocument will have a background color of Indian red, with the text
      colored Navajo white.  Any Forground or Background settings on this paragraph
      would override the top-level settings for the FlowDocument.
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

In het volgende voorbeeld ziet u hoe u de eigenschap Foreground programmatisch instelt.

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));
flowDoc.Background = Brushes.IndianRed;
flowDoc.Foreground = Brushes.NavajoWhite;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))
flowDoc.Background = Brushes.IndianRed
flowDoc.Foreground = Brushes.NavajoWhite

Opmerkingen

Zie voor een tabel met stalen met de beschikbare vooraf gedefinieerde kwastkleuren Brushes.

Alle Foreground instellingen op onderliggende elementen overschrijven deze instelling op het hoogste niveau.

Informatie over afhankelijkheidseigenschappen

Item Waarde
Id-veld ForegroundProperty
Eigenschappen van metagegevens ingesteld op true Microsoft.Authorization/*/write, , Microsoft.Network/vpnGateways/*

SubPropertiesDoNotAffectRender

Van toepassing op