FlowDocument.Foreground Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur Brush untuk diterapkan ke konten teks dari 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
Nilai Properti
Kuas yang digunakan untuk menerapkan ke konten teks. Defaultnya adalah Black.
Contoh
Contoh berikut menunjukkan cara mengatur Foreground atribut FlowDocument elemen.
<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>
Contoh berikut menunjukkan cara mengatur properti Foreground secara terprogram.
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
Keterangan
Untuk tabel swatch yang menunjukkan warna kuas yang telah ditentukan sebelumnya yang tersedia, lihat Brushes.
Pengaturan apa pun Foreground pada elemen turunan mengambil alih pengaturan tingkat atas ini.
Informasi Properti Dependensi
| Item | Nilai |
|---|---|
| Bidang pengidentifikasi | ForegroundProperty |
Properti metadata diatur ke true |
Microsoft.Authorization/*/write, , Microsoft.Network/vpnGateways/*SubPropertiesDoNotAffectRender |