편집

다음을 통해 공유


DataGridViewImageColumn.Icon Property

Definition

Gets or sets the icon displayed in the cells of this column when the cell's Value property is not set and the cell's ValueIsIcon property is set to true.

public:
 property System::Drawing::Icon ^ Icon { System::Drawing::Icon ^ get(); void set(System::Drawing::Icon ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Icon Icon { get; set; }
[System.ComponentModel.Browsable(false)]
public System.Drawing.Icon? Icon { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Icon : System.Drawing.Icon with get, set
Public Property Icon As Icon

Property Value

The Icon to display. The default is null.

Attributes

Remarks

The Icon property specifies an icons that is displayed in cells with no values when the column is not data-bound and the cell's ValueIsIcon property is set to true. For a data-bound column whose cells do not have an associated image, a standard error graphic is displayed.

Using the Icon property rather than the Image property ensures that an alpha channel in an icon is painted correctly. If you want to display an Image instead of an Icon, set the Image property instead and set the ValuesAreIcons property to false. You can also set the ValueIsIcon property of individual cells to indicate whether the cell displays the Image or the Icon property value.

Applies to

See also