This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IG > IGraphicProperties Interface > IGraphicProperties.FillSymbol Property (ArcObjects .NET 10.5 SDK) |
The fill symbol used by the CommandsEnvironment singleton.
[Visual Basic .NET] Public Property FillSymbol As IFillSymbol
[C#] public IFillSymbol FillSymbol {get; set;}
[C++]
HRESULT get_FillSymbol(
IFillSymbol** ppFillSymbol
);
[C++]
HRESULT put_FillSymbol(
IFillSymbol* ppFillSymbol
);
[C++]
Parameters ppFillSymbol [out, retval]
ppFillSymbol is a parameter of type IFillSymbol ppFillSymbol [in]
ppFillSymbol is a parameter of type IFillSymbol
The FillSymbol used by the ControlsNewCircleTool, ControlsNewEllipseTool, ControlsNewPolygonTool, ControlsNewRectangleTool and the IHookActions methods. By default the IFillSymbol::Color is yellow and the IFillSymbol::Outline is black with a width of 1.
The IFillSymbol::Color and IFillSymbol::Outline return clones, so to change the default color and outline set an IColor object into IFillSymbol::Color and an ILineSymbol into IFillSymbol::Outline.
//Get the IGraphicProperties interface
IGraphicProperties graphicProperties=new
CommandsEnvironmentClass();//Get the IRgbColor interface
IRgbColor color=new
RgbColorClass();//Set the color to be red ((Red) + (Green * 256) + (Blue * 256 * 256))
color.RGB=255;//Get the ISimpleLineSymbol interface
ISimpleLineSymbol outline=(ISimpleLineSymbol) graphicProperties.FillSymbol.Outline;//Set the color and width
outline.Color=color; outline.Width=3;//Set the FillSymbol's color and outline
graphicProperties.FillSymbol.Color=color; graphicProperties.FillSymbol.Outline=outline;
'Get the IGraphicProperties interface
Dim
graphicPropertiesAs
IGraphicProperties=New
CommandsEnvironmentClass'Get the IRgbColor interface
Dim
colorAs
IRgbColor=New
RgbColorClass'Set the color to be red ((Red) + (Green * 256) + (Blue * 256 * 256))
color.RGB=255'Get the ISimpleLineSymbol interface
Dim
outlineAs
ISimpleLineSymbol=graphicProperties.FillSymbol.Outline'Set the color and width
outline.Color=color outline.Width=3'Set the FillSymbol's color and outline
graphicProperties.FillSymbol.Color=color graphicProperties.FillSymbol.Outline=outline