ArcObjects Library Reference (Controls)  

IGraphicProperties.LineSymbol Property

The line symbol used by the CommandsEnvironment singleton.

[Visual Basic .NET]
Public Property LineSymbol As ILineSymbol
[C#]
public ILineSymbol LineSymbol {get; set;}
[C++]
HRESULT get_LineSymbol(
  ILineSymbol** ppLineSymbol
);
[C++]
HRESULT put_LineSymbol(
  ILineSymbol* ppLineSymbol
);
[C++]

Parameters

ppLineSymbol [out, retval]

  ppLineSymbol is a parameter of type ILineSymbol

ppLineSymbol [in]

  ppLineSymbol is a parameter of type ILineSymbol

Product Availability

Available with ArcGIS Engine.

Description

The LineSymbol used by the ControlsNewCurveTool, ControlsNewFreeHandTool, ControlsNewLineTool, ControlsInkGenericDrawTool, ControlsInkHighlightTool, ControlsInkPenTool and the IHookActions methods. By default the Size is 2, and the ILineSymbol::Color is black.

The ILineSymbol::Color returns a clone, so to change the default color set an IColor object into ILineSymbol::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 LineSymbol's color and size
graphicProperties.LineSymbol.Color = color;
graphicProperties.LineSymbol.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 LineSymbol's color and size
graphicProperties.LineSymbol.color = color
graphicProperties.LineSymbol.Size = 3

See Also

IGraphicProperties Interface

.NET Samples

Controls commands environment (Code Files: CommandsEnvironment) |