Returns true if the
UltraTab.ExcludedSharedControls collection has been allocated
and has at least one control.
Syntax
| Visual Basic (Declaration) | |
|---|
Public ReadOnly Property HasExcludedSharedControls As Boolean |
| C# | |
|---|
public bool HasExcludedSharedControls {get;} |
Example
The following sample code illustrates how to share controls among tabs.
| Visual Basic | Copy Code |
|---|
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
Dim tb As New TextBox()
tb.Location = New Point(20, 20)
tb.Size = New Size(80, 20)
Me.ultraTabControl1.SharedControls.Add(tb)
Me.ultraTabControl1.Tabs(0).ExcludedSharedControls.Add(tb)
Me.ultraTabControl1.Tabs(1).ExcludedSharedControls.Add(tb)
If Me.ultraTabControl1.Tabs(1).HasExcludedSharedControls = True Then
End If
End Sub
|
| C# | Copy Code |
|---|
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 )
{
//...
}
} |
See Also