TX Text Control .NET for WPF

GetItem Method

Method|Introduced in 18.0
Namespace
TXTextControl.DataVisualization
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets a particular chart from the collection.

Syntax

GetItem()

Gets the chart selected by the user.

public ChartFrame GetItem();

GetItem(int)

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

public ChartFrame GetItem(int id);
ParameterDescription
id

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

GetItem(string)

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

public ChartFrame GetItem(string name);
ParameterDescription
name

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

Return Value

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

Examples

The following example retrieves item from the chart collection.

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