ArcObjects Library Reference (Controls)  

IGraphicProperties.MarkerSymbol Property

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

Product Availability

Available with ArcGIS Engine.

Description

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.

[C#]

//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;

[Visual Basic .NET]

'Get the IGraphicProperties interface
Dim graphicProperties As IGraphicProperties = New CommandsEnvironmentClass
'Get the IRgbColor interface
Dim color As 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

See Also

IGraphicProperties Interface

.NET Samples

Controls commands environment (Code Files: CommandsEnvironment) |