FlowDocument.Background 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 yang Brush digunakan untuk mengisi latar belakang area konten.
public:
property System::Windows::Media::Brush ^ Background { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush Background { get; set; }
member this.Background : System.Windows.Media.Brush with get, set
Public Property Background As Brush
Nilai Properti
Kuas yang digunakan untuk mengisi latar belakang area konten, atau null untuk tidak menggunakan kuas latar belakang. Defaultnya adalah null.
Contoh
Contoh berikut menunjukkan cara mengatur Background 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 Background 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.
Informasi Properti Dependensi
| Item | Nilai |
|---|---|
| Bidang pengidentifikasi | BackgroundProperty |
Properti metadata diatur ke true |
AffectsRender |