DataGridViewImageColumn.ValuesAreIcons DataGridViewImageColumn.ValuesAreIcons DataGridViewImageColumn.ValuesAreIcons DataGridViewImageColumn.ValuesAreIcons Property

定義

取得或設定值,指出此資料行中的儲存格是否會顯示 Icon 值。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; }
member this.ValuesAreIcons : bool with get, set
Public Property ValuesAreIcons As Boolean

屬性值

如果儲存格顯示型別 Icon 的值,則為 true;如果儲存格顯示型別 Image 的值,則為 falsetrue if cells display values of type Icon; false if cells display values of type Image. 預設為 falseThe default is false.

例外狀況

備註

若要確保正確繪製Icon值的 Alpha 色板, 請將此屬性設定為。 trueTo ensure that the alpha channel of Icon values is painted correctly, set this property to true.

取得或設定這個屬性會取得或設定ValueIsIcon CellTemplate屬性所傳回之物件的屬性。Getting or setting this property gets or sets the ValueIsIcon property of the object returned by the CellTemplate property. 設定這個屬性也會設定ValueIsIcon資料行中每個資料格的屬性, 並重新整理資料行的顯示。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.

如果DefaultCellStyle屬性NullValue所傳回之物件的屬性具有與類型Bitmap的標準錯誤圖形相等的值, 則ValuesAreIcons將屬性值變更為true自動設定NullValue為類型Icon的標準錯誤圖形。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. 如果NullValue的值等於類型Icon的標準錯誤圖形, 則ValuesAreIcons將屬性值變更為false會自動設定NullValue為類型Bitmap的標準錯誤圖形。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.

適用於

另請參閱