TX Text Control .NET for Windows Forms

Culture Property

Property|Introduced in 30.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the style's culture. When this property is null, the style has the neutral culture.

Syntax

public CultureInfo Culture { get; set; }

Examples

The following example creates a reusable emphasis style and adds it to the document by using FormattingStyle.Culture.

FormattingStyle formattingStyle = new InlineStyle("Emphasis");

formattingStyle.Culture = System.Globalization.CultureInfo.GetCultureInfo("en-US");
if (formattingStyle.Culture != null)
{
    Console.WriteLine("Formatting Style: Culture is available.");
}

textControl.InlineStyles.Add((InlineStyle)formattingStyle);