FlowDocument.IsOptimalParagraphEnabled FlowDocument.IsOptimalParagraphEnabled FlowDocument.IsOptimalParagraphEnabled FlowDocument.IsOptimalParagraphEnabled Property

定義

最適な段落レイアウトが有効かどうかを示す値を取得または設定します。Gets or sets a value that indicates whether optimal paragraph layout is enabled or disabled.

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。それ以外の場合は falsetrue if optimal paragraph layout is enabled; otherwise, false. 既定値は、false です。The default is false.

要素の属性IsOptimalParagraphEnabledを設定する方法を次の例に示します。 FlowDocumentThe following example shows how to set the IsOptimalParagraphEnabled attribute of a FlowDocument element.

<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のがどのようにレンダリングされるかを示しています。The following figure shows how the preceding FlowDocument renders.

![スクリーンFlowDocument ハイフンが]有効な(~/add/media/flowdoc-hyphenenabled.png "スクリーンショット:FlowDocument ハイフン有効")Screenshot: FlowDocument hyphen enabled

次のFlowDocument図は、のIsOptimalParagraphEnabled = false既定の設定で同じ描画を行う方法を示しています。The following figure shows how the same FlowDocument renders with the default setting of IsOptimalParagraphEnabled=false.

スクリーン無効なハイフンScreenshot: FlowDocument with disabled hyphens

次の例では、プログラムをIsOptimalParagraphEnabled使用してプロパティを設定する方法を示します。The following example shows how to set the IsOptimalParagraphEnabled property programmatically.

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分散されるように、内の段落をレイアウトする機能です。Optimal paragraph layout is a feature that lays out paragraphs in the FlowDocument such that white space is distributed as evenly as possible. 理論的には、これにより、行揃えのテキストやその他のレイアウトルーチンでは、混乱のない空白を排除することで、読みやすさを最適化できます。Theoretically, this provides an optimized reading experience by eliminating distracting white space that can occur with line-justified text and other layout routines. 最適な段落レイアウトは、 IsHyphenationEnabled (プロパティによって表される) 自動ハイフネーションと組み合わせた場合に特に有効です。Optimal paragraph layout is particularly effective when coupled with automatic hyphenation (represented by the IsHyphenationEnabled property).

依存プロパティ情報Dependency Property Information

識別子フィールドIdentifier field IsOptimalParagraphEnabledProperty
メタデータプロパティがに設定されるtrueMetadata properties set to true AffectsMeasure

適用対象