Gets or sets the unique name of a NamedImage object.
Image name.
Visual Basic (Declaration) | |
---|---|
Public Property Name As String |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public string Name {get; set;} |
Return Value
The unique name of a NamedImage object, which is stored in the Images collection.
The property identifies a NamedImage object which is stored in the Images collection. This name must be unique, otherwise an exception will be thrown when the object is added to the collection.
Use NamedImage objects for dynamically created images, which can then be assigned to a chart image property.
It is this Name property value that is used when setting a chart image property to a NamedImage object (see the sample code below).
When one of the Chart control's image properties is set by specifying a string value the Images collection (of type NamedImageCollection) is first checked to see if an image with that name exists. If a matching NamedImage object is found then this image is used. If a matching NamedImage object is not located then the string expression is treated as a URL, image resource name or pathname.
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