NumberSubstitution Class

Specifies how numbers in text are displayed in different cultures.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Class NumberSubstitution
'Usage
Dim instance As NumberSubstitution
This type is not typically used in XAML as an object element. However, the type exposes several attached properties that can be set on other object elements that have text content.

Most cultures use the decimal system to represent numbers, but many cultures use different digit shapes from those we are familiar with in the West. 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.

System.Object
  System.Windows.Media.NumberSubstitution

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft