Version

Appearance Property (UltraToolbarsManager)

Returns or sets the Appearance object that controls the object's formatting.
Syntax
'Declaration
 
Public Property Appearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase Appearance {get; set;}
Remarks

The Appearance property of an object is used to associate the object with an Appearance object that will determine its appearance. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For many of the objects in UltraWinToolbars, you do not set formatting properties directly. Instead, you set the properties of an Appearance object, which controls the formatting of the object it is attached to.

Note that the properties of an Appearance object can also operate in a hierarchical fashion. Certain properties can be set to a "use default" value, which indicates to the control that the property should take its setting from the object's parent. This functionality is enabled by default, so that unless you specify otherwise, child objects resemble their parents, and formatting set at higher levels of the control hierarchy is inherited by objects lower in the hierarchy.

Example
The following code demonstrates how to set non-default values for many of the properties on the UltraToolbarsManager component.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars

	Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

		' Disable the 'Personalized menus' feature by setting always showing full menus.
		' When this property is left at its defaut setting (false), only recently used items are
		' initially shown in menus.  The hidden items (i.e., non-recently used items) are shown
		' after a short delay.  They can also be shown by clicking the downward pointing double
		' chevron at the bottom of the menu.
		Me.UltraToolbarsManager1.AlwaysShowMenusExpanded = DefaultableBoolean.True


		' Specify some default settings for the toolbar manager's appearance.
		Me.UltraToolbarsManager1.Appearance.BackColor = SystemColors.ActiveCaption
		Me.UltraToolbarsManager1.Appearance.BackColor2 = SystemColors.InactiveCaption
		Me.UltraToolbarsManager1.Appearance.BackGradientStyle = GradientStyle.HorizontalBump


		' Create some named appearances we can use throughout our code.
		Me.UltraToolbarsManager1.Appearances.Add("StandardMenus")
		Me.UltraToolbarsManager1.Appearances("StandardMenus").BackColor = Color.LightBlue
		Me.UltraToolbarsManager1.Appearances("StandardMenus").ForeColor = Color.DarkBlue

		Me.UltraToolbarsManager1.Appearances.Add("RestrictedMenus")
		Me.UltraToolbarsManager1.Appearances("RestrictedMenus").BackColor = Color.DarkGray
		Me.UltraToolbarsManager1.Appearances("RestrictedMenus").ForeColor = Color.Silver


		' Setup the toolbar manager to place its toolbars on the form.  We do this by setting
		' the DockWithinContainer property of the toolbars manager.
		Me.UltraToolbarsManager1.DockWithinContainer = Me


		' Specify a value for floating toolbar fade delay (in illiseconds) which determines the
		' delay before a floating toolbar is faded to 20% opacity.
		Me.UltraToolbarsManager1.FloatingToolbarFadeDelay = 500


		' Set the imagelists to use.
		Me.UltraToolbarsManager1.ImageListLarge = Me.ImageList1
		Me.UltraToolbarsManager1.ImageListSmall = Me.ImageList2


		' Specify a size value for small images (defaults to 16x16).
		Me.UltraToolbarsManager1.ImageSizeSmall = New Size(24, 24)


		' Specify a size value for large images (defaults to 32x32).
		Me.UltraToolbarsManager1.ImageSizeLarge = New Size(48, 48)


		' Specify a color that should be interptreted as 'transparent' when tool images
		' are displayed.
		Me.UltraToolbarsManager1.ImageTransparentColor = Color.Magenta


		' Lock the toolbars so they cannot be moved.  This also prevents the grab handles 
		' from being displayed.
		Me.UltraToolbarsManager1.LockToolbars = True


		' Prevent toolbars and menus in this toolbars manager from being merged with our
		' MDI parent's toolbars and menus.  This only has meaning when the form on which
		' the toolbars manager has been placed is an MDI child form i.e., has had its MDI
		' parent property set.
		Me.UltraToolbarsManager1.MdiMergeable = False


		' Enable random menu animations.
		Me.UltraToolbarsManager1.MenuAnimationStyle = MenuAnimationStyle.Random


		' Specify some settings that will be applied to all menus.  (Note: These settings
		' can be overridden for specific menus by accessing the Settings object on
		' the associated PopupMenuTool objects)
		Me.UltraToolbarsManager1.MenuSettings.Appearance.BackColor = Color.Red

		' Show a vertical size strip for all menus.
		Me.UltraToolbarsManager1.MenuSettings.IsSideStripVisible = DefaultableBoolean.True

		' Display all menus as toolbars.
		Me.UltraToolbarsManager1.MenuSettings.PopupStyle = PopupStyle.Toolbar

		' Display a vertical side strip with the company name on all menus.
		Me.UltraToolbarsManager1.MenuSettings.SideStripText = "My Company Name"


		' Show font names in font.
		Me.UltraToolbarsManager1.ShowFontNamesInFont = True


		' Specify a delay value (in milliseconds) for showing full menus when personalized menus are active
		' (i.e., the AlwaysShowFullMenus propery is set to false)
		Me.UltraToolbarsManager1.ShowFullMenusDelay = 500


		' Don't show shadows under menus.
		Me.UltraToolbarsManager1.ShowMenuShadows = DefaultableBoolean.False


		' Don't show the quick customize tool on toolbars.
		Me.UltraToolbarsManager1.ShowQuickCustomizeButton = False


		' Show shortcuts in tooltips
		Me.UltraToolbarsManager1.ShowShortcutsInToolTips = True


		' Show tooltips when the mouse hovers over a tool.
		Me.UltraToolbarsManager1.ShowToolTips = True


		' Set the style of the toolbars and menus.
		Me.UltraToolbarsManager1.Style = ToolbarStyle.Office2000


		' Specify some settings that will be applied to all toolbars.  (Note: These settings
		' can be overridden for specific toolbars by accessing the Settings object on
		' the associated UltraToolbar objects)
		' Don't allow toolbars to dock to the left or right.
		Me.UltraToolbarsManager1.ToolbarSettings.AllowDockLeft = DefaultableBoolean.False
		Me.UltraToolbarsManager1.ToolbarSettings.AllowDockRight = DefaultableBoolean.False

		' Don't allow toolbars to be customized.
		Me.UltraToolbarsManager1.ToolbarSettings.AllowCustomize = DefaultableBoolean.False

		' Show all toolbar button captions below the button's image.
		Me.UltraToolbarsManager1.ToolbarSettings.CaptionPlacement = TextPlacement.BelowImage

		' Increase the spacing between toolbar tools to 10 pixels.
		Me.UltraToolbarsManager1.ToolbarSettings.ToolSpacing = 10


		' Use large images on toolbars ans menus.
		Me.UltraToolbarsManager1.UseLargeImagesOnToolbar = True
		Me.UltraToolbarsManager1.UseLargeImagesOnMenu = True

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinToolbars;

		private void button7_Click(object sender, System.EventArgs e)
		{

			// Disable the 'Personalized menus' feature by setting always showing full menus.
			// When this property is left at its defaut setting (false), only recently used items are
			// initially shown in menus.  The hidden items (i.e., non-recently used items) are shown
			// after a short delay.  They can also be shown by clicking the downward pointing doubl;e
			// chevron at the bottom of the menu.
			this.ultraToolbarsManager1.AlwaysShowMenusExpanded = DefaultableBoolean.True;


			// Specify some default settings for the toolbar manager's appearance.
			this.ultraToolbarsManager1.Appearance.BackColor			= SystemColors.ActiveCaption;
			this.ultraToolbarsManager1.Appearance.BackColor2		= SystemColors.InactiveCaption;
			this.ultraToolbarsManager1.Appearance.BackGradientStyle	= GradientStyle.HorizontalBump;


			// Create some named appearances we can use throughout our code.
			this.ultraToolbarsManager1.Appearances.Add("StandardMenus");
			this.ultraToolbarsManager1.Appearances["StandardMenus"].BackColor = Color.LightBlue;
			this.ultraToolbarsManager1.Appearances["StandardMenus"].ForeColor = Color.DarkBlue;

			this.ultraToolbarsManager1.Appearances.Add("RestrictedMenus");
			this.ultraToolbarsManager1.Appearances["RestrictedMenus"].BackColor = Color.DarkGray;
			this.ultraToolbarsManager1.Appearances["RestrictedMenus"].ForeColor = Color.Silver;


			// Setup the toolbar manager to place its toolbars on the form.  We do this by setting
			// the DockWithinContainer property of the toolbars manager.
			this.ultraToolbarsManager1.DockWithinContainer = this;


			// Specify a value for floating toolbar fade delay (in illiseconds) which determines the
			// delay before a floating toolbar is faded to 20% opacity.
			this.ultraToolbarsManager1.FloatingToolbarFadeDelay = 500;


			// Set the imagelists to use.
			this.ultraToolbarsManager1.ImageListLarge = this.imageList1;
			this.ultraToolbarsManager1.ImageListSmall = this.imageList2;


			// Specify a size value for small images (defaults to 16x16).
			this.ultraToolbarsManager1.ImageSizeSmall = new Size(24, 24);


			// Specify a size value for large images (defaults to 32x32).
			this.ultraToolbarsManager1.ImageSizeLarge = new Size(48, 48);


			// Specify a color that should be interptreted as 'transparent' when tool images
			// are displayed.
			this.ultraToolbarsManager1.ImageTransparentColor = Color.Magenta;


			// Lock the toolbars so they cannot be moved.  This also prevents the grab handles 
			// from being displayed.
			this.ultraToolbarsManager1.LockToolbars = true;


			// Prevent toolbars and menus in this toolbars manager from being merged with our
			// MDI parent's toolbars and menus.  This only has meaning when the form on which
			// the toolbars manager has been placed is an MDI child form i.e., has had its MDI
			// parent property set.
			this.ultraToolbarsManager1.MdiMergeable = false;


			// Enable random menu animations.
			this.ultraToolbarsManager1.MenuAnimationStyle = MenuAnimationStyle.Random;


			// Specify some settings that will be applied to all menus.  (Note: These settings
			// can be overridden for specific menus by accessing the Settings object on
			// the associated PopupMenuTool objects)
				this.ultraToolbarsManager1.MenuSettings.Appearance.BackColor	= Color.Red;

				// Show a vertical size strip for all menus.
				this.ultraToolbarsManager1.MenuSettings.IsSideStripVisible		= DefaultableBoolean.True;

				// Display all menus as toolbars.
				this.ultraToolbarsManager1.MenuSettings.PopupStyle				= PopupStyle.Toolbar;

				// Display a vertical side strip with the company name on all menus.
				this.ultraToolbarsManager1.MenuSettings.SideStripText			= "My Company Name";


			// Show font names in font.
			this.ultraToolbarsManager1.ShowFontNamesInFont = true;


			// Specify a delay value (in milliseconds) for showing full menus when personalized menus are active
			// (i.e., the AlwaysShowFullMenus propery is set to false)
			this.ultraToolbarsManager1.ShowFullMenusDelay = 500;


			// Don't show shadows under menus.
			this.ultraToolbarsManager1.ShowMenuShadows = DefaultableBoolean.False;


			// Don't show the quick customize tool on toolbars.
			this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;


			// Show shortcuts in tooltips
			this.ultraToolbarsManager1.ShowShortcutsInToolTips = true;


			// Show tooltips when the mouse hovers over a tool.
			this.ultraToolbarsManager1.ShowToolTips = true;


			// Set the style of the toolbars and menus.
			this.ultraToolbarsManager1.Style = ToolbarStyle.Office2000;


			// Specify some settings that will be applied to all toolbars.  (Note: These settings
			// can be overridden for specific toolbars by accessing the Settings object on
			// the associated UltraToolbar objects)
				// Don't allow toolbars to dock to the left or right.
				this.ultraToolbarsManager1.ToolbarSettings.AllowDockLeft	= DefaultableBoolean.False;
				this.ultraToolbarsManager1.ToolbarSettings.AllowDockRight	= DefaultableBoolean.False;

				// Don't allow toolbars to be customized.
				this.ultraToolbarsManager1.ToolbarSettings.AllowCustomize	= DefaultableBoolean.False;

				// Show all toolbar button captions below the button's image.
				this.ultraToolbarsManager1.ToolbarSettings.CaptionPlacement	= TextPlacement.BelowImage;

				// Increase the spacing between toolbar tools to 10 pixels.
				this.ultraToolbarsManager1.ToolbarSettings.ToolSpacing		= 10;


			// Use large images on toolbars ans menus.
			this.ultraToolbarsManager1.UseLargeImagesOnToolbar	= true;
			this.ultraToolbarsManager1.UseLargeImagesOnMenu		= true;

		}
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