NamedImage.Name Property

.NET Framework (current version)
 

Gets or sets the unique name of a NamedImage object.

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

[BindableAttribute(false)]
public override string Name { get; set; }

Property Value

Type: System.String

A string value that represents the unique name of a NamedImage object stored in the NamedImagesCollection.

The property identifies a NamedImage object that is stored in the NamedImagesCollection. This name must be unique, or 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.

This Name property value is used when you set a chart image property to a NamedImage object.

When one of the image properties of the Chart control is set by specifying a string value, the Images collection property—of type NamedImagesCollection—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, an image resource name, or an image path.

.NET Framework
Available since 4.0
Return to top
Show: