FlowDocument.IsHyphenationEnabled 속성

정의

단어에 자동 하이픈 넣기가 설정되어 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

단어에 자동 줄 바꿈 및 하이픈 넣기가 설정되어 있으면 true이고, 그렇지 않으면 false입니다. 기본값은 false입니다.

예제

다음 예제에서는 설정 하는 방법을 보여 줍니다 합니다 IsHyphenationEnabled 특성을 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 의 기본 설정을 사용 하 여 렌더링 IsHyphenationEnabled=false합니다.

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

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

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 를 자동으로 중단 하 고 현재 레이아웃 조건에 따라 단어에 하이픈입니다. 긴 단어를 한 줄에서 시작 하 고이 단계를 계속 있으며 양쪽 맞춤 된 텍스트의 공백은 고르게 분포를 달성 하는 경향이 있습니다. 단어 분리 되며 표준 문법 규칙에 따라 하이픈으로 연결 됩니다. 자동 하이픈 넣기는 최적의 단락 레이아웃(속성으로 표시됨)과 결합할 IsOptimalParagraphEnabled 때 특히 효과적입니다.

종속성 속성 정보

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

적용 대상