Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXTabControl.GetTabItem(Object) Method

Returns a tab item by the corresponding data item.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public DXTabItem GetTabItem(
    object item
)

#Parameters

Name Type Description
item Object

A data item that corresponds to the required tab item.

#Returns

Type Description
DXTabItem

A DXTabItem object, that is a tab item corresponding to the specified data item; null (Nothing in Visual Basic) if the specified data item does not exist.

#Remarks

Use the GetTabItem method to obtain a tab item, when tab control’s data items are not the DXTabItem type. This happens when the tab control is bound to a data source, or when its Items collection has been manually filled with arbitrary objects. In this instance, the GetTabItem method returns a DXTabItem object obtained from the specified data item, using the template specified by the ItemTemplate property.

To obtain a tab item by its index, use another overload of the GetTabItem method that takes the index parameter.

See Also