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.MarkerSymbol Property (ArcObjects .NET 10.5 SDK) |
The marker symbol used by the CommandsEnvironment singleton.
[Visual Basic .NET] Public Property MarkerSymbol As IMarkerSymbol
[C#] public IMarkerSymbol MarkerSymbol {get; set;}
[C++]
HRESULT get_MarkerSymbol(
IMarkerSymbol** ppMarkerSymbol
);
[C++]
HRESULT put_MarkerSymbol(
IMarkerSymbol* ppMarkerSymbol
);
[C++]
Parameters ppMarkerSymbol [out, retval]
ppMarkerSymbol is a parameter of type IMarkerSymbol ppMarkerSymbol [in]
ppMarkerSymbol is a parameter of type IMarkerSymbol
The MarkerSymbol used by the ControlsNewMarkerTool, ControlsRouteCommand and the IHookActions methods. By default the IMarkerSymbol::Size is 2, and the IMarkerSymbol::Color is black.
The IMarkerSymbol::Color returns a clone, so to change the default color set an IColor object into IMarkerSymbol::Color.
//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;//Set the MarkerSymbol's color and size
graphicProperties.MarkerSymbol.Color=color; graphicProperties.MarkerSymbol.Size=3;
'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'Set the MarkerSymbol's color and size
graphicProperties.MarkerSymbol.color=color graphicProperties.MarkerSymbol.Size=3