Export (0) Print
Expand All

TextBlock.IsHyphenationEnabled Property

Gets or sets a value that indicates whether automatic hyphenation of words is enabled or disabled.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public bool IsHyphenationEnabled { get; set; }
/** @property */
public boolean get_IsHyphenationEnabled ()

/** @property */
public void set_IsHyphenationEnabled (boolean value)

public function get IsHyphenationEnabled () : boolean

public function set IsHyphenationEnabled (value : boolean)

<object IsHyphenationEnabled="bool" .../>

Property Value

true to indicate that automatic breaking and hyphenation of words is enabled; false otherwise. The default value is false.

The automatic word hyphenation feature enables a TextBlock to automatically break and hyphenate words, based on current layout conditions. This enables long words to begin on one line and continue on this next, and tends to achieve a more even distribution of white space in justified text. Words are broken and hyphenated according to standard grammar rules.

For a sample that explores the IsHyphenationEnabled property in real time, see the Optimal Paragraph and Hyphenation in a FlowDocument Sample.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft