LegendItemsCollection.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a custom LegendItem object to the end of the collection.
Overloads
Add(Color, String) |
Adds a custom LegendItem object with the specified text and symbol color to the end of the collection. |
Add(String, String) |
Adds a custom LegendItem object with the specified image to the end of the collection. |
Add(Color, String)
Adds a custom LegendItem object with the specified text and symbol color to the end of the collection.
public:
int Add(System::Drawing::Color color, System::String ^ text);
public int Add (System.Drawing.Color color, string text);
override this.Add : System.Drawing.Color * string -> int
Public Function Add (color As Color, text As String) As Integer
Parameters
- color
- Color
The symbol color of the legend item.
- text
- String
The legend item text.
Returns
An integer
that represents the location in the zero-based index where the item was inserted into the collection.
Remarks
Appends a custom legend item with the specified text and symbol color to the end of the collection.
To add a custom legend item that uses an image for its symbol, call the Add method.
To insert a custom LegendItem object into the collection, use one of the Insert
methods in this class.
Applies to
Add(String, String)
Adds a custom LegendItem object with the specified image to the end of the collection.
public:
int Add(System::String ^ image, System::String ^ text);
public int Add (string image, string text);
override this.Add : string * string -> int
Public Function Add (image As String, text As String) As Integer
Parameters
- image
- String
The absolute or relative URL of the image file to be used for the legend item symbol.
- text
- String
The legend item text.
Returns
An integer
that represents the location in the zero-based index where the item was inserted into the collection.
Remarks
Appends a custom legend item to the collection with the specified text and image to be used as the symbol for the legend item.
To add a custom legend item that uses a color for its symbol, call the Add method.
To insert a LegendItem object into the collection use one of the Insert
methods in this class.
Applies to
.NET