InlineStyleCollection Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
- Inherits
- Formatting
Style Collection - Inline
Style Collection
- Formatting
- Implements
- ICollection, IEnumerable
Description
An instance of the InlineStyleCollection class contains all inline formatting styles in the current document represented through objects of the type InlineStyle. An inline style is a character-based formatting style that can be used to format single words in a line of text. The InlineStyleCollection class implements the IEnumerable and the ICollection interfaces. An instance of this class can be obtained with the TextControl.InlineStyles property.
Syntax
public sealed class InlineStyleCollection : FormattingStyleCollectionPublic NotInheritable Class InlineStyleCollection
Inherits FormattingStyleCollectionExamples
The following example works with inline styles in the current document.
InlineStyleCollection inlineStyleCollection = textControl.InlineStyles;
inlineStyleCollection.Add(new InlineStyle("Emphasis"));Dim inlineStyleCollection As InlineStyleCollection = textControl.InlineStyles
inlineStyleCollection.Add(New InlineStyle("Emphasis"))Members
Properties
| Property | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. (Inherited from FormattingStyleCollection.) |
| IsSynchronized | Returns true if the collection is designed to be thread safe, otherwise, it returns false. (Inherited from FormattingStyleCollection.) |
| SyncRoot | Gets an object that can be used to synchronize access to the collection. (Inherited from FormattingStyleCollection.) |
Methods
| Method | Description |
|---|---|
| Add | Adds to new formatting style to the current document. |
| CopyTo | Copies the elements of the collection to an array, starting at a particular index. |
| GetEnumerator | Returns an enumerator that can be used to iterate through the collection. (Inherited from FormattingStyleCollection.) |
| GetItem | Gets a particular style from the collection. |
| Remove | Removes a formatting style from a Text Control document. (Inherited from FormattingStyleCollection.) |