![]() |
This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPageLayoutControl3 Interface > IPageLayoutControl3.BackColor Property (ArcObjects .NET 10.4 SDK) |
Background color of the PageLayoutControl.
[Visual Basic .NET] Public Property BackColor As Integer
[C#] public int BackColor {get; set;}
[C++]
HRESULT get_BackColor(
long* pclr
);
[C++]
HRESULT put_BackColor(
long pclr
);
[C++]
Parameters pclr [out, retval] pclr is a parameter of type long pclr [in] pclr is a parameter of type long
Returns or sets the Background Color of the PageLayoutControl. The Background color is used to draw the area of the Control outside the Page itself. 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.
When working directly with AxControls class use the BackColor property as follows:
AxPageLayoutControl1.BackColor=System.Drawing.Color.Red;
When using the Controls interop assembly use the BackColor property as follows:
IPageLayoutControl3 pageLayoutControl=(IPageLayoutControl3) AxPageLayoutControl1.Object; pageLayoutControl.BackColor=255;
To set the background color of the Page itself use the following code:
IRgbColor rgbColor=new RgbColorClass();
rgbColor.Blue=255;
axPageLayoutControl1.Page.BackgroundColor=rgbColor;
When working directly with AxControls class use the BackColor property as follows:
AxPageLayoutControl1.BackColor=System.Drawing.Color.Red
When using the Controls interop assembly use the BackColor property as follows:
Dim
pageLayoutControlAs
IPageLayoutControl3=AxPageLayoutControl1.Object pageLayoutControl.BackColor=Convert.ToUInt32(255)
To set the background color of the Page itself use the following code:
Dim pColor As IRgbColor
pColor=New RgbColor
pColor.Blue=255
AxPageLayoutControl1.Page.BackgroundColor=pColor