FormattedText.SetCulture Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기