wpf-devexpress-dot-xpf-dot-core-82399f87.md
Represents a single tab item.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public class DXTabItem :
HeaderedSelectorItemBase<DXTabControl, DXTabItem>
Public Class DXTabItem
Inherits HeaderedSelectorItemBase(Of DXTabControl, DXTabItem)
The following members return DXTabItem objects:
The DXTabControl contains a collection of tab pages, represented by the DXTabItem objects ( tab items ). This collection is zero-based indexed and can be accessed using the DXTabControl.Items property.
You can add DXTabItems in the DXTabControl in any of the following ways:
Click the Add Tab item in the DXTabControl’s Smart Tag.
Create DXTabItem objects and add them to the DXTabControl.Items collection.
Add arbitrary objects (data items) to the DXTabControl.Items collection and specify the DXTabControl.ItemTemplate and DXTabControl.ItemHeaderTemplate templates. These templates define how to present tab headers and pages, respectively. In this instance, DXTabItem objects will be generated from data items automatically.
Bind the tab control to a data source. To do this, assign a data source to the DXTabControl.ItemsSource property. In this case, the control retrieves data items from the data source and add them to the DXTabControl.Items collection. Similar to the previous case, you should specify the DXTabControl.ItemTemplate and DXTabControl.ItemHeaderTemplate templates to define the tab headers and pages visual presentation.
A tab item consists of a header and content. Tab items’ headers are displayed in the Header Panel. An end-user can select an item by clicking its header. A tab item’s header can optionally contain an icon and a close button, used to hide the item’s header from the Header Panel. An image to be used as an icon is specified by the DXTabItem.Glyph or DXTabItem.GlyphTemplate property. The close button’s visibility is specified by the DXTabItem.AllowHide property.
The DXTabControl contains a popup menu ( header menu ), whose items correspond to tab items in the DXTabControl. Clicking a menu item automatically selects the corresponding tab item. Content of the menu item is specified by the corresponding tab item’s DXTabItem.HeaderMenuContent property. To specify whether a tab item is included into the header menu, use the DXTabItem.VisibleInHeaderMenu property.
To learn more about tab item features, see DXTabControl.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DXTabItem class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-richedit-document-api/CS/DXRichEditControlAPISample/MainWindow.xaml#L29
<dx:DXTabControl x:Name="tabControl" Grid.Row="1" Grid.Column="0" SelectionChanged="tabControl_SelectionChanged">
<dx:DXTabItem Header="CS" Width="250">
<dxre:RichEditControl x:Name="richEditControlCS" ActiveViewType="Simple" />
wpf-tabcontrol-customize-background-based-on-tab-state/CS/DXTabControlExample/MainWindow.xaml#L36
<dx:DXTabControl.ItemContainerStyle>
<Style TargetType="dx:DXTabItem">
<Setter Property="HoverBackgroundTemplate" Value="{StaticResource TabItemHoverBackground}"/>
wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/MainWindow.xaml#L30
<dx:DXTabControl x:Name="tabControl" Grid.Row="1" Grid.Column="0" SelectionChanged="tabControl_SelectionChanged">
<dx:DXTabItem Header="CS" Width="250">
<dxre:RichEditControl x:Name="richEditControlCS" ActiveViewType="Simple" />
wpf-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/MainWindow.xaml#L30
<dx:DXTabControl x:Name="tabControl" Grid.Row="1" Grid.Column="0" SelectionChanged="tabControl_SelectionChanged">
<dx:DXTabItem Header="CS" Width="250">
<dxre:RichEditControl x:Name="richEditControlCS" ActiveViewType="Simple" />
dxrichedit-for-wpf-how-to-implement-progress-indicator/CS/MainWindow.xaml#L18
<dx:DXTabControl Name="tabControl" Grid.Row="1" SelectionChanged="tabControl_SelectionChanged">
<dx:DXTabItem Header="Template">
<dxre:RichEditControl Name="richEditControl1" Loaded="richEditControl1_Loaded" MailMergeStarted="richEditControl1_MailMergeStarted" MailMergeFinished="richEditControl1_MailMergeFinished" MailMergeRecordStarted="richEditControl1_MailMergeRecordStarted" MailMergeRecordFinished="richEditControl1_MailMergeRecordFinished" />
Show 11 items
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ContentControl DevExpress.Xpf.Core.Native.SelectorItemBase<DXTabControl, DXTabItem> DevExpress.Xpf.Core.Native.HeaderedSelectorItemBase<DXTabControl, DXTabItem> DXTabItem
See Also