Export (0) Print
Expand All

Typography.ContextualAlternates Property

Gets or sets a value that determines whether custom glyph forms can be used based upon the context of the text being rendered.

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

public bool ContextualAlternates { get; set; }
/** @property */
public boolean get_ContextualAlternates ()

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

public function get ContextualAlternates () : boolean

public function set ContextualAlternates (value : boolean)

You cannot use this property in XAML.

Property Value

true if custom glyph forms can be used; otherwise, false. The default value is true.

Random contextual alternates provide multiple substitute glyphs for a single character. When implemented with script-type fonts, this feature can simulate handwriting by using of a set of randomly chosen glyphs with slight differences in appearance. The following text uses random contextual alternates for the Lindsey font. Notice that the letter "a" varies slightly in appearance

Example of random contextual alternates


Text using OpenType random contextual alternates

The following code example shows how to define random contextual alternates for the Lindsey font, using the ContextualAlternates property.

<TextBlock FontFamily="Lindsey">
  <Run Typography.ContextualAlternates="True">
    a banana in a cabana
  </Run>
</TextBlock>

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