TX Text Control .NET Server

GetItem Method

Method|Introduced in 23.0
Namespace
TXTextControl.DataVisualization
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 a particular drawing from the collection.

Syntax

GetItem()

Gets the drawing selected by the user.

public DrawingFrame GetItem();

GetItem(int)

Gets the drawing with the specified identifier. An id can be set with the ID property.

public DrawingFrame GetItem(int id);
ParameterDescription
id

Specifies the drawing's identifier. The method returns null, if a drawing with the specified identifier does not exist.

GetItem(string)

Gets the drawing with the specified name. A name can be set with the Name property.

public DrawingFrame GetItem(string name);
ParameterDescription
name

Specifies the drawing's name. The method returns null, if a drawing with the specified name does not exist.

Return Value

The return value is null, if a drawing with the specified parameters could not be found. Otherwise, it is an object of the type DataVisualization.DrawingFrame.

Examples

The following example retrieves item from the drawing collection.

var result = drawingCollection.GetItem(100);
Console.WriteLine($"Get Item result: {result}");