Skip to main content

BaseView.CustomDrawBackground Event

Occurs when the current View’s background becomes visible to an end-user.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public event CustomDrawBackgroundEventHandler CustomDrawBackground

Event Data

The CustomDrawBackground event's data class is DevExpress.XtraBars.Docking2010.CustomDrawBackgroundEventArgs.


You can set a View’s background via the BaseView.BackgroundImage property. Use the BaseView.BackgroundImageLayoutMode property to customize its layout. If these properties are insufficient for your needs (for instance, if you want to display a background image at specific point, or show several images), handle the CustomDrawBackground event and access via its argument a System.Drawing.Graphics class, which encapsulates a GDI+ drawing surface. The code below illustrates how 2 images can be displayed as the View’s background.

private void tabbedView1_CustomDrawBackground(object sender, CustomDrawBackgroundEventArgs e) {
    e.GraphicsCache.DrawImage(global::documentManager.Properties.Resources.Image1, new Point(0, 0));
    e.GraphicsCache.DrawImage(global::documentManager.Properties.Resources.Image2, new Point(400, 0));

DocumentManager CustomDrawBackground

See the System.Drawing.Graphics class at MSDN to learn more.

See Also