TX Text Control .NET Server

Italic Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets the italic attribute of the selected text.

Syntax

public bool Italic { get; set; }

Examples

The following example formats the heading of a short document by using Selection.Italic.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.Italic = true;
if (selection.Italic)
{
    Console.WriteLine("Selection: Italic is enabled.");
}

Limitations

Runtime only.

Remarks

The property's default value is false.

The property returns its default value when the text selection contains multiple characters with mixed setting. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.

Further Reading

  • TX Text Control .NET: Undo and the Selection Object –
  • MailMerge: Using IncludeText Fields to Inject Formatted Text –
  • Overriding IE's Predefined Shortcuts Like CTRL-B –