GetItem Method
- 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 a particular style from the collection.
Syntax
public InlineStyle GetItem(string styleName);Public Function GetItem(styleName As String) As InlineStyleParameters
| Parameter | Description |
|---|---|
| styleName | Specifies the name of the style. |
Return Value
The return value is null, if a style with the specified name is not contained in the collection. Otherwise it is an object of the type InlineStyle.
Examples
The following example works with inline styles in the current document by using InlineStyleCollection.GetItem.
InlineStyleCollection inlineStyleCollection = textControl.InlineStyles;
inlineStyleCollection.Add(new InlineStyle("Emphasis"));
var result = inlineStyleCollection.GetItem("CustomerName");
Console.WriteLine($"Get Item result: {result}");Dim inlineStyleCollection As InlineStyleCollection = textControl.InlineStyles
inlineStyleCollection.Add(New InlineStyle("Emphasis"))
Dim result = inlineStyleCollection.GetItem("CustomerName")
Console.WriteLine($"Get Item result: {result}")