FlowDocument.Foreground 속성

정의

Brush 의 텍스트 콘텐츠에 적용할 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

속성 값

Brush

텍스트 콘텐츠에 적용하는 데 사용되는 브러시입니다. 기본값은 Black입니다.

예제

다음 예제에서는 설정 하는 방법을 보여 줍니다 합니다 Foreground 특성을 FlowDocument 요소입니다.

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

다음 예제에서는 설정 하는 방법의 Foreground 속성 프로그래밍 방식으로 합니다.

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

설명

사용할 수 있는 미리 정의 된 브러시 색을 보여 주는 견본 테이블을 참조 하세요. Brushes합니다.

모든 Foreground 자식 요소에 최상위 수준 설정을 재정의 합니다.

종속성 속성 정보

식별자 필드 ForegroundProperty
메타 데이터 속성 설정 true AffectsRender, Inherits,

SubPropertiesDoNotAffectRender

적용 대상