This document is archived and information here might be outdated.  Recommended version.


IMapControl4.BackColor Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControl4 Interface > IMapControl4.BackColor Property
ArcGIS Developer Help

IMapControl4.BackColor Property

Background color of the MapControl.

[Visual Basic .NET]
Public Property BackColor As Integer
[C#]
public int BackColor {get; set;}
[C++]
HRESULT get_BackColor(
void
);
[C++]
HRESULT put_BackColor(
);

Product Availability

Available with ArcGIS Engine.

Description

Returns or sets the Background Color of the MapControl. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

[C#]

When working directly with AxControls class use the BackColor property as follows:

AxMapControl1.BackColor = System.Drawing.Color.Red;

When using the Controls interop assembly use the BackColor property as follows:

IMapControl4 mapControl = (IMapControl4) AxMapControl1.Object;
mapControl.BackColor = 255;

[Visual Basic .NET]

When working directly with AxControls class use the BackColor property as follows:

AxMapControl1.BackColor = System.Drawing.Color.Red

When using the Controls interop assembly use the BackColor property as follows:

Dim mapControl As IMapControl4 = AxMapControl1.Object
mapControl.BackColor = Convert.ToUInt32(255)

See Also

IMapControl4 Interface