Dundas Chart for ASP.NET
Add(String,Image) Method
See Also  Send comments on this topic.
Dundas.Charting.WebControl Namespace > NamedImagesCollection Class > Add Method : Add(String,Image) Method


name

A string identifier that uniquely identifies the NamedImage object in the collection.


Name of the image.
image

An object derived from the .NET Image class (e.g. BitMap class).


Image class.

Adds a NamedImage object to the end of the collection, taking the name and associated image as parameters.


Add item to the collection.

Syntax

Visual Basic (Declaration)  
Public Overloads Function Add( _
   ByVal name As String, _
   ByVal image As Image _
) As NamedImage
Visual Basic (Usage) Copy Code
Dim instance As NamedImagesCollection
Dim name As String
Dim image As Image
Dim value As NamedImage
 
value = instance.Add(name, image)
C#  
public NamedImage Add( 
   string name,
   Image image
)

Parameters

name

A string identifier that uniquely identifies the NamedImage object in the collection.


Name of the image.
image

An object derived from the .NET Image class (e.g. BitMap class).


Image class.

Return Value

Returns an integer that represents the index where the item was inserted into the collection (0-based).


New Chart Area

Remarks

Call this method to append a NamedImage object to the end of the collection (the order of these objects in the collection is irrelevant).

The name parameter value must be unique to the collection, otherwise an exception will be thrown.

Use the name parameter value when assigning a NamedImage object to one of the chart's image properties (see sample code below).

The image stored by the NamedImage object can be any object derived from the .NET Image class (e.g. the BitMap class).

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.