FlowDocument.IsOptimalParagraphEnabled 속성

정의

최적의 단락 레이아웃 기능이 설정되어 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool IsOptimalParagraphEnabled { bool get(); void set(bool value); };
public bool IsOptimalParagraphEnabled { get; set; }
member this.IsOptimalParagraphEnabled : bool with get, set
Public Property IsOptimalParagraphEnabled As Boolean

속성 값

최적의 단락 레이아웃 기능이 설정되어 있으면 true이고, 그렇지 않으면 false입니다. 기본값은 false입니다.

예제

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

<FlowDocumentReader>
  <FlowDocument
    TextAlignment="Justify" 
    IsHyphenationEnabled="True"
    IsOptimalParagraphEnabled="True"
    Background="LightGray"
    PageWidth="400" PageHeight="480"
  >
    <Paragraph>
      <Hyperlink NavigateUri="http://www.xbox.com/en-US/games/p/perfectdarkzero/default.htm">
        Perfect Dark Zero
      </Hyperlink>
    </Paragraph>
    <Paragraph>
      Joanna Dark returns in the Xbox 360 exclusive <Bold><Italic>Perfect Dark Zero</Italic></Bold>, the 
      prequel to the internationally award-winning and multi-million selling first-person shooter 
      <Italic>Perfect Dark</Italic> from famed game developer Rare.
    </Paragraph>
    <Paragraph>
      A secret war has begun between shadowy corporations bent on world domination. Joanna Dark and her father 
      Jack are caught up in the fight for the future of the planet. A routine bounty hunting mission rips open 
      a global conspiracy that will change Joanna's destiny—forever.
    </Paragraph>
    <Paragraph>
      Guide Joanna Dark on her journey to become the perfect agent. Featuring a compelling and captivating story, 
      <Italic>Perfect Dark Zero</Italic> plunges you into a world of corporate espionage and conspiracy. The title 
      merges the excitement and intrigue of its predecessor with revolutionary game design, cutting-edge online play,
      and amazing graphics to deliver an experience that defines next-generation gaming and entertainment...
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

다음 그림에서는 앞 FlowDocument 의 렌더링 방법을 보여 줍니다.

스크린샷: FlowDocument 하이픈 사용

다음 그림에서는 어떻게 동일 FlowDocument 의 기본 설정을 사용 하 여 렌더링 IsOptimalParagraphEnabled=false합니다.

스크린샷: 사용 안 함 하이픈이 있는 FlowDocument

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

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));

// Enable automatic hyphenation.
flowDoc.IsHyphenationEnabled = true;
// Enable optimal paragraph layout.
flowDoc.IsOptimalParagraphEnabled = true;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))

' Enable automatic hyphenation.
flowDoc.IsHyphenationEnabled = True
' Enable optimal paragraph layout.
flowDoc.IsOptimalParagraphEnabled = True

설명

최적의 단락 레이아웃은 공백이 가능한 한 균등하게 분산되도록 단락 FlowDocument 을 레이아웃하는 기능입니다. 이론적으로 이 기능은 줄 맞춤 텍스트 및 기타 레이아웃 루틴에서 발생할 수 있는 주의를 산만하게 하는 공백을 제거하여 최적화된 읽기 환경을 제공합니다. 최적의 단락 레이아웃은 자동 하이픈(속성으로 표시)과 결합할 IsHyphenationEnabled 때 특히 효과적입니다.

종속성 속성 정보

식별자 필드 IsOptimalParagraphEnabledProperty
메타 데이터 속성 설정 true AffectsMeasure

적용 대상