Culture Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets or sets the culture of the selected text.
Syntax
public CultureInfo Culture { get; set; }Public Property Culture As CultureInfoExamples
The following example formats the heading of a short document by using Selection.Culture.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
selection.Culture = System.Globalization.CultureInfo.GetCultureInfo("en-US");
if (selection.Culture != null)
{
Console.WriteLine("Selection: Culture is available.");
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
selection.Culture = System.Globalization.CultureInfo.GetCultureInfo("en-US")
If selection.Culture IsNot Nothing Then
Console.WriteLine("Selection: Culture is available.")
End IfLimitations
Runtime only.
Remarks
The property's default value is null, which means a neutral culture.
The property returns its default value when the text selection contains multiple characters with mixed culture settings. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.