Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs
Imports Infragistics.Win.UltraWinTabControl
Private Sub InitializeTabStripControl()
With Me.ultraTabStripControl1
' Set the image background to conform and align with the
' form's BackgroundImage
.TabHeaderAreaAppearance.ImageBackground = Me.BackgroundImage
.TabHeaderAreaAppearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form
' Enable hot tracking (tabs hightlight as the mouse passes over them)
.HotTrack = True
' Set the layout style of the tabs to a multi-row style
.TabLayoutStyle = TabLayoutStyle.MultiRowTabsPerRow
' Set the MultiRowSelectionStyle to highlight the selected tab
.MultiRowSelectionStyle = MultiRowSelectionStyle.HighlightTab
' Set the # of tabs per row
.TabsPerRow = 4
' Set the max # of visible rows to show
.MaxVisibleTabRows = 5
' Set the spacing between tabs of the same row and between
' tab rows
.InterTabSpacing = New DefaultableInteger(3)
.InterRowSpacing = New DefaultableInteger(5)
' Note: the following code sets the spacing back to there
' default values
'.InterTabSpacing = DefaultableInteger.Default
'.InterRowSpacing = DefaultableInteger.Default
' Set the margins around the tab page.
.TabPageMargins.Top = 2
.TabPageMargins.Left = 2
.TabPageMargins.Right = 2
.TabPageMargins.Bottom = 2
' Set the TabKeyMember. This will automatically initialize
' each tab's Key property to the data value in that column.
.TabKeyMember = "CustomerID"
' Set the TabTextMember. This will automatically initialize
' each tab's Text property to the data value in that column.
.TabTextMember = "CustomerName"
' Set the ToolTipTextMember. This will automatically initialize
' each tab's ToolTipText property to the data value in that column.
.ToolTipTextMember = "Address"
' Set the SortMember. This will automatically sort the tabs
' based on the data values in that column.
.SortMember = "CustomerName"
' Set the direction of the sort.
.SortDirection = SortDirection.Descending
' Create an in-memory data source
Me.CreateData()
' Bind the tab strip to the data source
' Note: This clears the Tabs collection and re-populates it
' with a tab for every row in the data source.
.SetDataBinding(Me.dataSource, "")
' Note: Calling SetDataBinding is the same as setting the
' DataSource and DataMember properties individually
' but it does it in one atomic operation.
'.DataSource = Me.dataSource
'.DataMember = '
End With
' Set the data bindings for some textboxes
'Me.txtCustomerID.DataBindings.Add("Text", Me.dataSource, "CustomerID")
'Me.txtCustomerName.DataBindings.Add("Text", Me.dataSource, "CustomerName")
End Sub