Aracılığıyla paylaş


FlowDocument.Foreground Özellik

Tanım

öğesini öğesini öğesinin metin içeriğine FlowDocumentuygulanacak şekilde alır veya ayarlarBrush.

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

Özellik Değeri

Brush

Metin içeriğine uygulamak için kullanılan fırça. Varsayılan değer: Black.

Örnekler

Aşağıdaki örnekte bir FlowDocument öğenin özniteliğinin Foreground nasıl ayarlanacağı gösterilmektedir.

<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>

Aşağıdaki örnekte özelliğin Foreground program aracılığıyla nasıl ayarlanacağı gösterilmektedir.

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

Açıklamalar

Kullanılabilir önceden tanımlanmış fırça renklerini gösteren renk örnekleri tablosu için bkz Brushes. .

Alt öğelerdeki tüm Foreground ayarlar bu üst düzey ayarı geçersiz kılar.

Bağımlılık Özelliği Bilgileri

Tanımlayıcı alanı ForegroundProperty
Meta veri özellikleri olarak ayarlandı true AffectsRender, Inherits,

SubPropertiesDoNotAffectRender

Şunlara uygulanır