ערוך

שתף באמצעות


DataGridViewImageColumn.ValuesAreIcons Property

Definition

Gets or sets a value indicating whether cells in this column display Icon values.

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

Property Value

true if cells display values of type Icon; false if cells display values of type Image. The default is false.

Attributes

Exceptions

The value of the CellTemplate property is null.

Remarks

To ensure that the alpha channel of Icon values is painted correctly, set this property to true.

Getting or setting this property gets or sets the ValueIsIcon property of the object returned by the CellTemplate property. Setting this property also sets the ValueIsIcon property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.

If the NullValue property of the object returned by the DefaultCellStyle property has a value equal to the standard error graphic of type Bitmap, changing the ValuesAreIcons property value to true automatically sets NullValue to the standard error graphic of type Icon. If NullValue has a value equal to the standard error graphic of type Icon, changing the ValuesAreIcons property value to false automatically sets NullValue to the standard error graphic of type Bitmap.

Applies to

See also