DataGridViewImageCell.ValueIsIcon Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether this cell displays an Icon value.
public:
property bool ValueIsIcon { bool get(); void set(bool value); };
public bool ValueIsIcon { get; set; }
member this.ValueIsIcon : bool with get, set
Public Property ValueIsIcon As Boolean
Property Value
true
if this cell displays an Icon value; otherwise, false
.
Remarks
To ensure that the alpha channel of Icon values is painted correctly, set this property to true
. When this property is true
, the FormattedValueType and ValueType properties return a Type object representing the Icon type.
Setting the ValuesAreIcons property of the owning column 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.
When the value of this property changes for a cell in the row for new records, the image displayed in the cell is updated to the current value of the DefaultNewRowValue property.
Unlike the column ValuesAreIcons property, the cell ValueIsIcon property does not automatically update the NullValue property of the associated cell style when you change its value. When you change the cell ValueIsIcon property value to true
, be sure to set the NullValue property of the object returned by the Style property to a valid Icon. When you change the ValueIsIcon property value to false
, be sure to set the NullValue property to a valid Image.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기