Item Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets the subtextpart with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the SubTextPartCollection class.
Syntax
public SubTextPart this[int number] { get; }Default Public ReadOnly Property Item(number As Integer) As SubTextPartExamples
The following example updates the metadata stored with the first named region.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPartCollection parts = textControl.SubTextParts;
SubTextPart customer = new("CustomerName", 10) { Data = @"{""category"":""customer""}" };
parts.Add(customer);
if (parts.Count > 0)
{
parts[1].Data = @"{""reviewed"":true}";
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim parts As SubTextPartCollection = textControl.SubTextParts
Dim customer As New SubTextPart("CustomerName", 10) With { .Data = "{""category"":""customer""}" }
parts.Add(customer)
If parts.Count > 0 Then
parts.Item(1).Data = "{""reviewed"":true}"
End IfLimitations
Read only.