다음을 통해 공유


ImageList.ColorDepth 속성

이미지 목록의 색 농도를 가져옵니다.

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Public Property ColorDepth As ColorDepth
‘사용 방법
Dim instance As ImageList
Dim value As ColorDepth

value = instance.ColorDepth

instance.ColorDepth = value
public ColorDepth ColorDepth { get; set; }
public:
property ColorDepth ColorDepth {
    ColorDepth get ();
    void set (ColorDepth value);
}
/** @property */
public ColorDepth get_ColorDepth ()

/** @property */
public void set_ColorDepth (ColorDepth value)
public function get ColorDepth () : ColorDepth

public function set ColorDepth (value : ColorDepth)

속성 값

이미지에 대해 사용할 수 있는 색의 수입니다. .NET Framework 버전 1.0에서 기본값은 Depth4Bit입니다. .NET Framework 버전 1.1 이상에서 기본값은 Depth8Bit입니다.

예외

예외 형식 조건

InvalidEnumArgumentException

색상 수가 올바른 ColorDepth 열거형 값이 아닌 경우

설명

색 농도를 새 값으로 설정하면 이미지 목록에 대한 Handle이 다시 만들어집니다.

ColorDepth 속성을 설정하면 핸들이 다시 만들어지므로 Images 속성을 설정하기 전에 ColorDepth를 설정해야 합니다. Images 속성을 설정한 다음 코드에서 ColorDepth 또는 ImageSize 속성을 설정하면 Images 속성에 대해 설정된 이미지의 컬렉션이 삭제됩니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

ImageList 클래스
ImageList 멤버
System.Windows.Forms 네임스페이스
ColorDepth 열거형