You can customize the width and height of the tab by setting its ItemSize property to an appropriate value. This will make all the tabs the same size no matter what the content is inside each tab. The default settings for its size are based on the size of its text and image.
In addition to customizing the height and width of each tab you can also set a mode for the tabs. The TabSizeMode property contains four types of members: FillToEnd, Fit, Normal, and User. The FillToEnd stretches the tabs so they take the whole width of the tab control. The Fit squeezes all tabs so they fit into the width of the tab control. The Normal member gets the default sizing mode. The User member allows the user to specify the tab size in the MeasureTab event. The following table shows the effect of each TabSizeModeEnum member.
Property Setting | Image |
---|---|
Normal | |
Fit | |
FillToEnd | |
User |
The code snippet below shows how to customize the size of tabs to 'FillToEnd' using TabSizeMode property.
C# |
Copy Code
|
---|---|
// Specifies how tabs on DockingTab control are sized
dockingTab.TabSizeMode = TabSizeModeEnum.FillToEnd;
|