This document is archived and information here might be outdated.  Recommended version.


IMxDocument.DefaultColor Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (ArcMapUI)  

IMxDocument.DefaultColor Property

The default color for the given type.

[Visual Basic .NET]
Public Function get_DefaultColor ( _
    ByVal Type As esriMxDefaultColorTypes _
) As IColor
[Visual Basic .NET]
Public Sub set_DefaultColor ( _
    ByVal Type As esriMxDefaultColorTypes, _
    ByVal color As IColor _
)
[C#]
public IColor get_DefaultColor (
    esriMxDefaultColorTypes Type
);
[C#]
public void set_DefaultColor (
    esriMxDefaultColorTypes Type,
    IColor color
);

Product Availability

Available with ArcGIS Desktop.

Remarks

This one property accesses the default color object for each of the four available default symbol types.  Types include: text, fill, line, and marker symbols.  Access each default color object by passing a different value for Type from the the esriMxDefaultColorTypes enumeration.

All new graphics created with the Draw toolbar in ArcMap are initially drawn using their associated default symbol.  You can use this property to change the color of these default symbols. For example, to have new polygon graphics drawn in blue, create a new color object, assign it a blue color, and then set it as the new default fill symbol color.  After this, all new rectangle, polygon, circle, and ellipse graphics created in ArcMap will be initially drawn with a blue fill color.

You can acccess each default symbol individually via IDocumentDefaultSymbols.

 

See Also

IMxDocument Interface | esriMxDefaultColorTypes Constants