Export (0) Print
Expand All
Expand Minimize

NumberSubstitutionMethod Enumeration

Defines an enumerator class that specifies the type of number substitution to perform on numbers in a text run.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public enum NumberSubstitutionMethod
<object property="enumerationMemberName" .../>

Member nameDescription
AsCultureDefault. Specifies that the substitution method should be determined based on the number culture's DigitSubstitution property value.
ContextIf the number culture is an Arabic or Farsi culture, specifies that the digits depend on the context. Either traditional or Latin digits are used depending on the nearest preceding strong character, or, if there is none, the text direction of the paragraph.
EuropeanSpecifies that code points 0x30-0x39 are always rendered as European digits, in which case, no number substitution is performed.
NativeNationalSpecifies that numbers are rendered using the national digits for the number culture, as specified by the culture's NativeDigits property value.
TraditionalSpecifies that numbers are rendered using the traditional digits for the number culture. For most cultures, this is the same as the DigitShapes.NativeNational enumeration value. However, using NativeNational can result in Latin digits for some Arabic cultures, whereas using Traditional results in Arabic digits for all Arabic cultures.

Most cultures use the decimal system to represent numbers, but many cultures use different digit shapes. The following table shows several numbering systems used by different cultures.

Example of the appearance of digits in different cultures

Table of number substitution glyphs

It is not sufficient to provide alternate Unicode code points for each set of digit shapes, because, unlike letters, digits are used in calculations. Every application, every operating system, and every run-time library contains code dedicated to converting an internal binary format numeric value to a string of characters, and vice versa. These conversion routines are coded to use Unicode digits "0030" through "0039".

The NumberSubstitution class provides functionality that allows different cultures to substitute the appropriate digit shapes at rendering time. This functionality is similar to the one used for providing font substitution and language dependent font rendering.

NoteNote

Many cultures are discarding their traditional digits shapes and adopting Western digits shapes, therefore the number substitution functionality recognizes the distinction for each culture between traditional digit shapes and national standard digit shapes.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft