'Declaration Public ReadOnly Property SharedControls As SharedControlsCollection
public SharedControlsCollection SharedControls {get;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabControl Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ' Create a new control Dim tb As New TextBox() tb.Location = New Point(20, 20) tb.Size = New Size(80, 20) ' Add it to the SharedControls collection. ' This will cause the the textbox to be displayed ' on every tab by default. Me.ultraTabControl1.SharedControls.Add(tb) ' Add the tab to the first 2 tab's ExcludedSharedControls ' collections. This will prevent the control from being ' shown on those tabs. Me.ultraTabControl1.Tabs(0).ExcludedSharedControls.Add(tb) Me.ultraTabControl1.Tabs(1).ExcludedSharedControls.Add(tb) ' The 'HasExcludedSharedControls' property returns true if ' the 'ExcludedSharedControls' collection has been created ' and it contains at least 1 control. This is preferable to ' checking the 'Count' property of the 'ExcludedSharedControls' ' collection since the get on the 'ExcludedSharedControls' ' property will allocate a collection if one doesn't exist. If Me.ultraTabControl1.Tabs(1).HasExcludedSharedControls = True Then '... End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabControl; private void button2_Click(object sender, System.EventArgs e) { // Create a new control TextBox tb = new TextBox(); tb.Location = new Point(20,20); tb.Size = new Size(80, 20); // Add it to the SharedControls collection. // This will cause the the textbox to be displayed // on every tab by default. this.ultraTabControl1.SharedControls.Add( tb ); // Add the tab to the first 2 tab's ExcludedSharedControls // collections. This will prevent the control from being // shown on those tabs. this.ultraTabControl1.Tabs[0].ExcludedSharedControls.Add (tb ); this.ultraTabControl1.Tabs[1].ExcludedSharedControls.Add (tb ); // The 'HasExcludedSharedControls' property returns true if // the 'ExcludedSharedControls' collection has been created // and it contains at least 1 control. This is preferable to // checking the 'Count' property of the 'ExcludedSharedControls' // collection since the get on the 'ExcludedSharedControls' // property will allocate a collection if one doesn't exist. if ( this.ultraTabControl1.Tabs[1].HasExcludedSharedControls == true ) { //... } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2