Back to Devexpress

BarManagerAppearances.StatusBarAppearance Property

windowsforms-devexpress-dot-xtrabars-dot-barmanagerappearances-f3a725c2.md

latest6.8 KB
Original Source

BarManagerAppearances.StatusBarAppearance Property

Specifies appearance settings for items in status bars in different visual states.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public StateAppearances StatusBarAppearance { get; }
vb
Public ReadOnly Property StatusBarAppearance As StateAppearances

Property Value

TypeDescription
StateAppearances

A StateAppearances object that contains appearance settings.

|

Remarks

The BarAndDockingController allows you to specify appearance settings for items in menus and bars on all forms in the application. Use the controller’s AppearancesBar property to access the following appearance settings:

  • BarAppearance — appearance settings used to paint items in bars in the Normal, Hovered, Disabled, and Pressed states.

  • MainMenuAppearance — appearance settings used to paint items in main menus in different states.

  • StatusBarAppearance — appearance settings used to paint items in status bars in different states.

The code below shows how to use bold for items in the main menu.

csharp
barAndDockingController1.AppearancesBar.MainMenuAppearance.Normal.Font = 
    new System.Drawing.Font("Tahoma", 7.875F, System.Drawing.FontStyle.Bold);
barAndDockingController1.AppearancesBar.MainMenuAppearance.Normal.Options.UseFont = true;
vb
barAndDockingController1.AppearancesBar.MainMenuAppearance.Normal.Font =
    New System.Drawing.Font("Tahoma", 7.875!, System.Drawing.FontStyle.Bold)
barAndDockingController1.AppearancesBar.MainMenuAppearance.Normal.Options.UseFont = True

See the following help topic for more information on how to specify appearance settings: Appearances.

A bar’s BarAppearance property allows you to override these appearance settings for individual bars. To override appearance settings for an individual item, use the item’s ItemAppearance and ItemInMenuAppearance properties.

See the following topic for more information: Look and Feel.

Example

The code below shows how to specify a background color for bars.

csharp
// Use the DefaultBarAndDockingController component to access the default controller.
defaultBarAndDockingController1.Controller.AppearancesBar.BarAppearance.Normal.BackColor = Color.Red;
// You can also assign a custom controller to a manager.
barManager1.Controller = barAndDockingController1;
// The BarAppearance property specifies appearance settings in multiple states.
// Use the Normal property to specify appearance settings in the normal state.
barAndDockingController1.AppearancesBar.BarAppearance.Normal.BackColor = Color.Red;
// You can also use the Bar property to specify appearance settings in the normal state.
barAndDockingController1.AppearancesBar.Bar.BackColor = Color.Red;
// The BarAppearance property specifies appearance settings in multiple states.
// Use the Normal property to specify appearance settings in the normal state.
bar1.BarAppearance.Normal.BackColor = Color.White;
// You can also use the Appearance property to specify appearance settings in the normal state.
bar1.Appearance.BackColor = Color.White;
// You can also specify a particular bar's appearance settings.
barButtonItem1.ItemAppearance.Normal.BackColor = Color.White;
vb
' Use the DefaultBarAndDockingController component to access the default controller.
defaultBarAndDockingController1.Controller.AppearancesBar.BarAppearance.Normal.BackColor = Color.Red
' You can also assign a custom controller to a manager.
barManager1.Controller = barAndDockingController1
' The BarAppearance property specifies appearance settings in multiple states.
' Use the Normal property to specify appearance settings in the normal state.
barAndDockingController1.AppearancesBar.BarAppearance.Normal.BackColor = Color.Red
' You can also use the Bar property to specify appearance settings in the normal state.
barAndDockingController1.AppearancesBar.Bar.BackColor = Color.Red
' The BarAppearance property specifies appearance settings in multiple states.
' Use the Normal property to specify appearance settings in the normal state.
bar1.BarAppearance.Normal.BackColor = Color.White
' You can also use the Appearance property to specify appearance settings in the normal state.
bar1.Appearance.BackColor = Color.White
' You can also specify a particular bar's appearance settings.
barButtonItem1.ItemAppearance.Normal.BackColor = Color.White

Note

Skins use brushes or images to fill the background. The actual behavior depends on the skin. The background color is not in effect if the skin uses an image to fill the background.

See Also

MainMenuAppearance

BarAppearance

StatusBar

Look and Feel

BarManagerAppearances Class

BarManagerAppearances Members

DevExpress.XtraBars Namespace