How to: Control Appearance of Multiple Controls via StyleController

The following example creates a style controller and assigns it to a text and button editor. By doing so, the appearance of both editors is controlled by the StyleController object.

In the code we change the background color, font settings and style for editor buttons using corresponding properties of the style controller. The image below shows the result of the customization:

StyleController_example

using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;

StyleController sc = new StyleController();
sc.Appearance.Font = new Font("Tahoma", 11, FontStyle.Bold);
sc.Appearance.BackColor = Color.LemonChiffon;
sc.ButtonsStyle = BorderStyles.UltraFlat;
textEdit1.StyleController = sc;
buttonEdit1.StyleController = sc;