FormattedText.SetNumberSubstitution 方法

定義

設定 FormattedText 物件的數字取代行為。

多載

SetNumberSubstitution(NumberSubstitution)

設定 FormattedText 物件中整個字元集的數字取代行為。

SetNumberSubstitution(NumberSubstitution, Int32, Int32)

設定 FormattedText 物件內所指定文字的數字取代行為。

SetNumberSubstitution(NumberSubstitution)

設定 FormattedText 物件中整個字元集的數字取代行為。

public:
 void SetNumberSubstitution(System::Windows::Media::NumberSubstitution ^ numberSubstitution);
public void SetNumberSubstitution (System.Windows.Media.NumberSubstitution numberSubstitution);
member this.SetNumberSubstitution : System.Windows.Media.NumberSubstitution -> unit
Public Sub SetNumberSubstitution (numberSubstitution As NumberSubstitution)

參數

numberSubstitution
NumberSubstitution

要套用至文字的數字取代行為。可以是 null,在此情況下,會使用文字文化特性的預設數字取代方法。

備註

類別 NumberSubstitution 會指定文字中數位的顯示方式。 這個方法會設定整個文字字串的數位替代行為。 若要設定文字字串子集的數位替代行為,請使用 SetNumberSubstitution(NumberSubstitution, Int32, Int32) 方法。

適用於

SetNumberSubstitution(NumberSubstitution, Int32, Int32)

設定 FormattedText 物件內所指定文字的數字取代行為。

public:
 void SetNumberSubstitution(System::Windows::Media::NumberSubstitution ^ numberSubstitution, int startIndex, int count);
public void SetNumberSubstitution (System.Windows.Media.NumberSubstitution numberSubstitution, int startIndex, int count);
member this.SetNumberSubstitution : System.Windows.Media.NumberSubstitution * int * int -> unit
Public Sub SetNumberSubstitution (numberSubstitution As NumberSubstitution, startIndex As Integer, count As Integer)

參數

numberSubstitution
NumberSubstitution

要套用至文字的數字取代行為。可以是 null,在此情況下,會使用文字文化特性的預設數字取代方法。

startIndex
Int32

要套用變更之初始字元的起始索引。

count
Int32

應該要套用變更的字元數目。

備註

類別 NumberSubstitution 會指定文字中數位的顯示方式。 若要設定整個文字字串的數位替代行為,請使用 SetNumberSubstitution(NumberSubstitution) 方法。

適用於