FlowDocument.IsOptimalParagraphEnabled Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recebe ou define um valor que indica se o layout ótimo de parágrafo está ativado ou desativado.
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
Valor de Propriedade
true se o layout ótimo dos parágrafos estiver ativado; caso contrário, false. A predefinição é false.
Exemplos
O exemplo seguinte mostra como definir o IsOptimalParagraphEnabled atributo de um FlowDocument elemento.
<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>
A figura seguinte mostra como o anterior FlowDocument se apresenta.
A figura seguinte mostra como o mesmo FlowDocument renderiza com a definição padrão de IsOptimalParagraphEnabled=false.
O exemplo a seguir mostra como definir a propriedade IsOptimalParagraphEnabled programaticamente.
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
Observações
O layout ótimo dos parágrafos é uma funcionalidade que dispõe os parágrafos de FlowDocument forma a distribuir o espaço em branco da forma mais uniforme possível. Teoricamente, isto proporciona uma experiência de leitura otimizada ao eliminar espaços em branco distrativos que podem ocorrer com texto justificado por linhas e outras rotinas de layout. O layout ótimo dos parágrafos é particularmente eficaz quando combinado com a hífenização automática (representada pela propriedade IsHyphenationEnabled ).
Informação de Propriedade de Dependência
| Iteme | Value |
|---|---|
| Campo identificador | IsOptimalParagraphEnabledProperty |
Propriedades dos metadados definidas como true |
AffectsMeasure |