Bar and Docking Controllers (Customizing Default View and Behavior Settings)

  • 3 minutes to read

The DefaultBarAndDockingController and BarAndDockingController allow you to customize the application-scope (global) and form-scope display and customization settings for the controls and components included in the XtraBars library:

List of XtraBars Settings

The BarAndDockingController provides the following display and customization settings:

 

To learn how to customize the look-and-feel settings of the XtraBars controls, see Look And Feel and Skinning. The following sections show how you can customize other settings for all forms and individual forms.

Customizing the Default XtraBars Settings for all Forms (Default BarAndDockingController)

Place the DefaultBarAndDockingController component onto the main form to access the global settings shared by all XtraBars controls within all forms.

LookAndFeel_defaulBAndDCtrl

In code, use the BarAndDockingController.Default property to access and customize these settings.

Customizing the Default XtraBars Settings for Individual Forms (BarAndDockingController)

To specify the default settings for the XtraBars controls/components within a single form, add a BarAndDockingController component to the form.

Ensure that this controller is bound to the target DevExpress XtraBars controls, via their Controller properties.

By default, the Controller properties of the XtraBars controls and components are set to null, which means that the Default BarAndDockingController's settings are in effect for these controls. If you assign a BarAndDockingController object to this property, this controller will provide settings for the corresponding XtraBars control, instead of the Default BarAndDockingController.

When you place a BarAndDockingController component onto a form for the first time, it is automatically assigned to the Controller properties of existing XtraBars controls and components that reside on this form. From that point on, this controller will provide settings for these controls and components.

Example

Suppose you have two forms, each of which features a Bars UI implemented by a BarManager component.

If you want to provide identical settings for all the bars within the two forms, place the DefaultBarAndDockingController component onto the main form and customize its settings. The BarManager.Controller properties of the two BarManagers must be set to null.

If you need to provide independent bar settings for the two forms, do one of the following:

See Also