Version

CloseButtonAlignment Property (MdiTabSettings)

Gets or sets the alignment of the close button within the tab.
Syntax
'Declaration
 
Public Property CloseButtonAlignment As Infragistics.Win.UltraWinTabs.TabCloseButtonAlignment
public Infragistics.Win.UltraWinTabs.TabCloseButtonAlignment CloseButtonAlignment {get; set;}
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe value assigned is not defined in the Infragistics.Win.UltraWinTabs.TabCloseButtonAlignment enumeration.
Remarks

This only applies if the CloseButtonLocation of the owning tab group is set to Tab.

Example
The following code demonstrates how to control the behavior of a close button within a tab.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs

' Place close buttons in all the tabs of the tab control.
Me.UltraTabbedMdiManager1.TabGroupSettings.CloseButtonLocation = TabCloseButtonLocation.Tab

' Disable the close button in the first tab.
' This will also prevent middle clicking on the tab from closing it.
Me.UltraTabbedMdiManager1.TabGroups(0).Tabs(0).Settings.AllowClose = Infragistics.Win.DefaultableBoolean.False

' The second tab's close button should come before the image and text of the tab.
Me.UltraTabbedMdiManager1.TabGroups(0).Tabs(1).Settings.CloseButtonAlignment = TabCloseButtonAlignment.BeforeContent

' The third tab should only display a close button when it is the selected tab.
Me.UltraTabbedMdiManager1.TabGroups(0).Tabs(2).Settings.CloseButtonVisibility = TabCloseButtonVisibility.WhenSelected
using System.Windows.Forms;
using Infragistics.Win;
using Infragistics.Win.UltraWinTabs;

// Place close buttons in all the tabs of the tab control.
this.ultraTabbedMdiManager1.TabGroupSettings.CloseButtonLocation = TabCloseButtonLocation.Tab;

// Disable the close button in the first tab.
// This will also prevent middle clicking on the tab from closing it.
this.ultraTabbedMdiManager1.TabGroups[ 0 ].Tabs[ 0 ].Settings.AllowClose = Infragistics.Win.DefaultableBoolean.False;

// The second tab's close button should come before the image and text of the tab.
this.ultraTabbedMdiManager1.TabGroups[ 0 ].Tabs[ 1 ].Settings.CloseButtonAlignment = TabCloseButtonAlignment.BeforeContent;

// The third tab should only display a close button when it is the selected tab.
this.ultraTabbedMdiManager1.TabGroups[ 0 ].Tabs[ 2 ].Settings.CloseButtonVisibility = TabCloseButtonVisibility.WhenSelected;
Requirements

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

See Also