FlowDocument.IsOptimalParagraphEnabled Tulajdonság
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Lekéri vagy beállít egy értéket, amely jelzi, hogy az optimális bekezdéselrendezés engedélyezve van-e vagy le van tiltva.
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
Tulajdonság értéke
trueha az optimális bekezdéselrendezés engedélyezve van; egyéb esetben. false Az alapértelmezett érték a false.
Példák
Az alábbi példa bemutatja, hogyan állíthatja be egy IsOptimalParagraphEnabledFlowDocument elem attribútumát.
<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>
Az alábbi ábra bemutatja, hogyan jelenik FlowDocument meg az előző ábra.
Az alábbi ábra azt mutatja be, hogy ugyanez FlowDocument hogyan jelenik meg az alapértelmezett beállítássalIsOptimalParagraphEnabled=false.
Az alábbi példa bemutatja, hogyan állíthatja be a IsOptimalParagraphEnabled tulajdonságot programozott módon.
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
Megjegyzések
Az optimális bekezdéselrendezés olyan funkció, amely a bekezdéseket úgy helyezi el, hogy a FlowDocument szabad terület a lehető leg egyenletesen legyen elosztva. Ez elméletileg optimalizált olvasási élményt nyújt azáltal, hogy kiküszöböli a sorkizárt szöveggel és más elrendezési rutinokkal előforduló üres területeket. Az optimális bekezdéselrendezés különösen akkor hatékony, ha automatikus elválasztással van párosítva (amelyet a IsHyphenationEnabled tulajdonság jelöl).
Függőségi tulajdonság adatai
| Termék | Érték |
|---|---|
| Azonosító mező | IsOptimalParagraphEnabledProperty |
Metaadat-tulajdonságok beállítása: true |
AffectsMeasure |