The TabItemEx object derives from TabItem object, which in turn derives from HeaderedContentControl; therefore, using it will be similar to any headered content control found in Microsoft® Windows® Presentation Foundation. Just like any content control in Windows Presentation Foundation, you can set the Content property of a tab to an instance of an object. In many cases, you will use a layout container, such as a Grid panel, as the root element — adding additional elements to the layout container.
The following example code demonstrates how to add content to a tab.
In XAML:
<igWindows:XamTabControl Name="xamTabControl1"> <igWindows:TabItemEx Header="Tab 1"> <Grid> <RichTextBox /> </Grid> </igWindows:TabItemEx> </igWindows:XamTabControl>
In Visual Basic:
Imports Infragistics.Windows.Controls ... Dim grid1 As New Grid() grid1.Children.Add(New RichTextBox()) Dim tab1 As New TabItemEx() With {.Header = "Tab 1", .Content = grid1} Me.xamTabControl1.Items.Add(tab1) ...
In C#:
using Infragistics.Windows.Controls; ... Grid grid1 = new Grid(); grid1.Children.Add(new RichTextBox()); TabItemEx tab1 = new TabItemEx() { Header = "Tab 1", Content = grid1 }; this.xamTabControl1.Items.Add(tab1); ...