Szerkesztés

Megosztás a következőn keresztül:


FormattedText.SetCulture Method

Definition

Sets the CultureInfo for the formatted text.

Overloads

SetCulture(CultureInfo)

Sets the CultureInfo for the entire set of characters in the FormattedText object.

SetCulture(CultureInfo, Int32, Int32)

Sets the CultureInfo for a specified subset of characters in the FormattedText object.

SetCulture(CultureInfo)

Sets the CultureInfo for the entire set of characters in the FormattedText object.

public:
 void SetCulture(System::Globalization::CultureInfo ^ culture);
public void SetCulture (System.Globalization.CultureInfo culture);
member this.SetCulture : System.Globalization.CultureInfo -> unit
Public Sub SetCulture (culture As CultureInfo)

Parameters

culture
CultureInfo

The CultureInfo to use for text formatting.

Remarks

The CultureInfo class holds culture-specific information, such as the associated language, sublanguage, country/region, calendar, and cultural conventions. This class also provides access to culture-specific instances of DateTimeFormatInfo, NumberFormatInfo, CompareInfo, and TextInfo. These objects contain the information required for culture-specific operations, such as casing, formatting dates and numbers, and comparing strings.

This method sets the culture information value for the entire text string. To set the culture information value for a subset of the text string, use the SetCulture(CultureInfo, Int32, Int32) method.

Applies to

SetCulture(CultureInfo, Int32, Int32)

Sets the CultureInfo for a specified subset of characters in the FormattedText object.

public:
 void SetCulture(System::Globalization::CultureInfo ^ culture, int startIndex, int count);
public void SetCulture (System.Globalization.CultureInfo culture, int startIndex, int count);
member this.SetCulture : System.Globalization.CultureInfo * int * int -> unit
Public Sub SetCulture (culture As CultureInfo, startIndex As Integer, count As Integer)

Parameters

culture
CultureInfo

The CultureInfo to use for text formatting.

startIndex
Int32

The start index of initial character to apply the change to.

count
Int32

The number of characters the change should be applied to.

Remarks

The CultureInfo class holds culture-specific information, such as the associated language, sublanguage, country/region, calendar, and cultural conventions. This class also provides access to culture-specific instances of DateTimeFormatInfo, NumberFormatInfo, CompareInfo, and TextInfo. These objects contain the information required for culture-specific operations, such as casing, formatting dates and numbers, and comparing strings.

To set the culture information value for the entire text string, use the SetCulture(CultureInfo) method.

Applies to