NamedImage.Name 属性
定义
获取或设置 NamedImage 对象的唯一名称。Gets or sets the unique name of a NamedImage object.
public:
virtual property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(false)]
public override string Name { get; set; }
[<System.ComponentModel.Bindable(false)>]
member this.Name : string with get, set
Public Overrides Property Name As String
属性值
一个 string
值,表示存储在 NamedImage 中的 NamedImagesCollection 对象的唯一名称。A string
value that represents the unique name of a NamedImage object stored in the NamedImagesCollection.
- 属性
注解
属性标识 NamedImage 存储在中的对象 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.
将 NamedImage 对象用于动态创建的图像,然后可以将这些图像分配给图表图像属性。Use NamedImage objects for dynamically created images, which can then be assigned to a chart image property.
Name将图表图像属性设置为对象时,将使用此属性值 NamedImage 。This Name property value is used when you set a chart image property to a NamedImage object.
通过指定值设置控件的其中一个图像属性时 Chart string
,将 Images 首先检查类型为的集合属性, NamedImagesCollection 以确定是否存在具有指定名称的图像。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. 如果找到匹配的 NamedImage 对象,则使用此图像。If a matching NamedImage object is found, this image is used. 如果 NamedImage 未找到匹配的对象,则 string
该值被视为 URL、图像资源名称或图像路径。If a matching NamedImage object is not located, the string
value is treated as a URL, an image resource name, or an image path.