Returns/sets the appearance of the client area (not including the tab header area) when this tab is selected.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property ClientAreaAppearance As AppearanceBase |
Example
The following code demonstrates how to set non-default values for many of the properties on the UltraTabControl and UltraTabStripControl.
| Visual Basic | Copy Code |
|---|
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs
Imports Infragistics.Win.UltraWinTabControl
Private Sub InitializeTabControl()
With Me.ultraTabControl1
.SupportThemes = False
.Appearance.BackColor = Color.Silver
.Appearance.BackColor2 = Color.White
.Appearance.BackGradientStyle = GradientStyle.HorizontalBump
.Appearance.BackGradientAlignment = GradientAlignment.Client
.ClientAreaAppearance.BackColor = Color.Silver
.ClientAreaAppearance.BackColor2 = Color.White
.ClientAreaAppearance.BackGradientStyle = GradientStyle.HorizontalBump
.ClientAreaAppearance.BackGradientAlignment = GradientAlignment.Client
.ActiveTabAppearance.ForeColor = Color.Red
.SelectedTabAppearance.ForeColor = Color.Blue
.TabHeaderAreaAppearance.ImageBackground = Me.BackgroundImage
.TabHeaderAreaAppearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form
.HotTrack = True
.HotTrackAppearance.ForeColor = Color.FromArgb(255, 0, 255)
.AutoSelect = True
.AutoSelectDelay = 500
.HotTrack = True
.HotTrackAppearance.ForeColor = Color.FromArgb(255, 0, 255)
.AllowTabMoving = True
.Tabs(0).AllowMoving = DefaultableBoolean.False
.MinTabWidth = 35
.MaxTabWidth = 100
.NavigationStyle = NavigationStyle.AutoSelect
.ImageSize = New Size(16, 16)
.ScaleImages = ScaleImage.OnlyWhenNeeded
.ShowButtonSeparators = True
.ShowToolTips = True
.Style = UltraTabControlStyle.StateButtons
.TabButtonStyle = UIElementButtonStyle.PopupBorderless
.TabLayoutStyle = TabLayoutStyle.SingleRowAutoSize
.TabOrientation = TabOrientation.RightTop
.TextOrientation = TextOrientation.HorizontalPlus90
.TabPageSize = New Size(300, 100)
.TabSize = New Size(70, 20)
.TabPadding = New Size(3, 3)
.UseMnemonics = DefaultableBoolean.True
End With
End Sub
|
| C# | Copy Code |
|---|
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinTabs;
using Infragistics.Win.UltraWinTabControl;
private void InitializeTabControl()
{
// Turn of XP themes support to pick up explicit backcolor
// setting below
this.ultraTabControl1.SupportThemes =
false;
// Set the default appearance for all tabs
this.ultraTabControl1.Appearance.BackColor = Color.Silver;
this.ultraTabControl1.Appearance.BackColor2 = Color.White;
this.ultraTabControl1.Appearance.BackGradientStyle = GradientStyle.HorizontalBump;
this.ultraTabControl1.Appearance.BackGradientAlignment = GradientAlignment.Client;
// Set the default appearance for the client area
// which does not include the tab header area
this.ultraTabControl1.ClientAreaAppearance.BackColor = Color.Silver;
this.ultraTabControl1.ClientAreaAppearance.BackColor2 = Color.White;
this.ultraTabControl1.ClientAreaAppearance.BackGradientStyle = GradientStyle.HorizontalBump;
this.ultraTabControl1.ClientAreaAppearance.BackGradientAlignment = GradientAlignment.Client;
// Set a slightly different apperance for the currect
// 'ActiveTab' (the tab with focus)
this.ultraTabControl1.ActiveTabAppearance.ForeColor = Color.Red;
// Set a slightly different apperance for the currect
// 'SelectedTab' (the tab whose tab page is currently visible)
this.ultraTabControl1.SelectedTabAppearance.ForeColor = Color.Blue;
// Set the image background to conform and align with the
// form's BackgroundImage
this.ultraTabControl1.TabHeaderAreaAppearance.ImageBackground = this.BackgroundImage;
this.ultraTabControl1.TabHeaderAreaAppearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form;
// Set AutoSelect on so that if the mouse pauses over
// a tab for half a second the tab will be automatically
// selected
this.ultraTabControl1.AutoSelect =
true;
this.ultraTabControl1.AutoSelectDelay =
500;
// Enable hot tracking (tabs hightlight as the mouse passes over
them)
this.ultraTabControl1.HotTrack =
true;
this.ultraTabControl1.HotTrackAppearance.ForeColor = Color.FromArgb(255,0,255);
// Allow all tabs but the first tab to be moved
this.ultraTabControl1.AllowTabMoving =
true;
this.ultraTabControl1.Tabs[0].AllowMoving = DefaultableBoolean.False;
// Set width constraints (in pixels) on the tabs
this.ultraTabControl1.MinTabWidth =
35;
this.ultraTabControl1.MaxTabWidth =
100;
// Set the NavigationStyle property. This determines what
// happens when the user navigates betwen tabs via the
// keyboard (i.e. the arrow keys, page up, page down etc.).
// This assumes that the TabStop property is true and the
// control has focus.
this.ultraTabControl1.NavigationStyle =
NavigationStyle.AutoSelect;
// Specify the image size and also to scale larger
// images down to that size but leave smaller images
// unchanged.
this.ultraTabControl1.ImageSize =
new Size(16,16);
this.ultraTabControl1.ScaleImages =
ScaleImage.OnlyWhenNeeded;
// Specify that separators should be shown between buttons.
// This is ignored if the Style property is not set to
// StateButtons
this.ultraTabControl1.ShowButtonSeparators = true;
// Specify that tooltips will be shown when the cursor
// is paused over a tab.
// Note: Tooltips will only be displayed for tab's whose
// 'ToolTipText' property returns a string of at least 1
// character or the Tab's 'Text' is not fully visible
// due to size constraints.
this.ultraTabControl1.ShowToolTips =
true;
// Specify the style of the tabs
this.ultraTabControl1.Style =
UltraTabControlStyle.StateButtons;
// Specify the button style. This is ignored if the Style
// property is not set to StateButtons
this.ultraTabControl1.TabButtonStyle =
UIElementButtonStyle.PopupBorderless;
// Specify the layout of the tabs. There are various
// single-row and multi-row TabLayoutStyle's available
this.ultraTabControl1.TabLayoutStyle =
TabLayoutStyle.SingleRowAutoSize;
// Specify the orientation of the tabs and the text.
this.ultraTabControl1.TabOrientation =
TabOrientation.RightTop;
this.ultraTabControl1.TextOrientation =
TextOrientation.HorizontalPlus90;
// Specify the size of the tab page.
// Note: this will cause the control to be resized
this.ultraTabControl1.TabPageSize
= new Size(300, 100);
// Specify the default size of each tab.
// Note: the width is ignored untless the TabLayoutStyle is
// either SingleRowFixed or MultiRowFixed
this.ultraTabControl1.TabSize =
new Size(70, 20);
// Specify the amount of padding around the text and image
// when calcualting the size of the tabs.
this.ultraTabControl1.TabPadding
= new Size(3,3);
// Specify whether mnemonics will be supported. If so and
// there is an '&' in a tab's text, the following
character
// will be treated as an accelerator (i.e. the tab will
// be activated when the user presses the 'Alt' key and
// that character).
this.ultraTabControl1.UseMnemonics =
DefaultableBoolean.True;
}
|
See Also