Bar

BarManager.GetController() Method

Returns the actual bar and dock controller specifying behavior and appearance settings for the corresponding bars.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

public virtual BarAndDockingController GetController()
Public Overridable Function GetController As BarAndDockingController

Returns

Type Description
BarAndDockingController

A BarAndDockingController object providing common appearance settings for bars.

Remarks

Use this method to get the actual BarAndDockingController providing appearance options for the bars owned by the BarManager.

The value returned depends on the BarManager.Controller property, which allows you to assign a specific BarAndDockingController to the BarManager.

If you assign a controller to this property, the GetController will return this property value. Otherwise, the method will return the DefaultBarAndDockingController. The DefaultBarAndDockingController is intended to provide common settings for the BarManagers whose BarManager.Controller properties are not set. By default, the BarManager.Controller properties of BarManagers are set to null. Thus, all bars created on different forms in your application have identical styles and behavior. You can change this either by modifying the bars' settings or by creating and customizing other BarAndDockingControllers and assigning them to BarManagers on particular forms.

See the Look and Feel document for more information.

Examples

The following code shows how to change the paint style for the docking controller employed by the BarManager. If no BarAndDocking controller is assigned to the BarManager, then this code will change the default BarAndDocking controller. Otherwise, the code will change the assigned controller. This code will affect the appearance of all the bars and dock windows which use the same BarAndDocking controller (not only the bars and dock windows that belong to barManager1).

barManager1.GetController().PaintStyleName = "Office2003";
See Also