Freigeben über


Block.IsHyphenationEnabled Eigenschaft

Definition

Dient zum Abrufen oder Festlegen eines Werts, der angibt, ob die automatische Silbentrennung von Wörtern aktiviert oder deaktiviert ist.

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

Eigenschaftswert

truewenn die automatische Unterbrechung und Silbentrennung von Wörtern aktiviert ist; andernfalls . false Der Standardwert lautet false.

Beispiele

Das folgende Beispiel zeigt, wie das IsHyphenationEnabled Attribut eines Block Elements festgelegt wird.

<FlowDocument
  TextAlignment="Justify" 
  IsOptimalParagraphEnabled="True"
  Background="LightGray"
  PageWidth="400" PageHeight="480"
>
  <Paragraph IsHyphenationEnabled="True">
    <Hyperlink NavigateUri="http://www.xbox.com/en-US/games/p/perfectdarkzero/default.htm">
      Perfect Dark Zero
    </Hyperlink>
  </Paragraph>
  <Paragraph IsHyphenationEnabled="True">
    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 IsHyphenationEnabled="True">
    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 IsHyphenationEnabled="True">
    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>

Die folgende Abbildung zeigt, wie das vorherige Beispiel gerendert wird.

Screenshot: FlowDocument-Bindestrich aktiviert

Die folgende Abbildung zeigt, wie dasselbe Beispiel mit der Standardeinstellung von IsHyphenationEnabled=false.

Screenshot: FlowDocument mit deaktivierten Bindestrichen

Das folgende Beispiel zeigt, wie die IsHyphenationEnabled-Eigenschaft programmgesteuert festgelegt wird.

Paragraph par = new Paragraph();
par.IsEnabled = true;
Dim par As New Paragraph()
par.IsEnabled = True

Hinweise

Das Feature für die automatische Worttrennung ermöglicht es einem Block Element, Wörter basierend auf den aktuellen Layoutbedingungen automatisch zu unterbrechen und zu trennen. Auf diese Weise können lange Wörter in einer Zeile beginnen und auf dieser nächsten Zeile fortfahren, und in der Regel wird eine gleichmäßigere Verteilung des Leerraums im blocksatzigen Text erzielt. Wörter sind gemäß den Standardgrammatikregeln gebrochen und bindestriche.

Informationen zur Abhängigkeitseigenschaft

Element Wert
Bezeichnerfeld IsHyphenationEnabledProperty
Auf Metadateneigenschaften festgelegt true AffectsMeasure, AffectsRenderInherits

Gilt für: