This documentation is archived and is not being maintained.

NamedImage Class

Represents named images, which are stored in the NamedImagesCollection.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

type NamedImage =  
        inherit ChartNamedElement

The NamedImage type exposes the following members.

Public methodNamedImage()Initializes a new instance of the NamedImage class.
Public methodNamedImage(String, Image)Initializes a new instance of the NamedImage class with the specified name of the named image and its associated image.

Public propertyImageGets or sets the image of a NamedImage object.
Public propertyNameGets or sets the unique name of a NamedImage object. (Overrides ChartNamedElement.Name.)
Public propertyTagGets or sets an object associated with this chart element. (Inherited from ChartElement.)

Public methodDispose()Releases the resources used by the ChartElement. (Inherited from ChartElement.)
Protected methodDispose(Boolean)Releases unmanaged and, optionally, managed resources. (Overrides ChartElement.Dispose(Boolean).)
Public methodEqualsDetermines whether the specified Object is equal to the current ChartElement. (Inherited from ChartElement.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns a hash function for a particular type. (Inherited from ChartElement.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current Object. (Inherited from ChartElement.)

The NamedImage class represents an image that has a unique name, and is useful when an image is dynamically created using a particular drawing routine, and then specified as the image for one of the image properties of the Chart control.

The Name property determines the unique name of a NamedImage object. The Image property determines its associated image, which can be any object derived from the .NET Framework Image class.

When one of the image properties of the Chart control is set by specifying a string value, the Images collection property is first checked to determine whether an image with the specified name exists. If a matching NamedImage object is found, this image is used. If a matching NamedImage object is not located, the string value is treated as a URL, image resource name, or an image path.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.