ImageList.ColorDepth default is Depth32Bit

The default value for ImageList.ColorDepth has changed over time. Starting in .NET 8, the default value has changed from Depth8Bit to Depth32Bit. This change affects both new and existing applications if they're upgraded to target .NET 8.

Version introduced

.NET 8 Preview 1

Previous behavior

The default value for ImageList.ColorDepth was ColorDepth.Depth8Bit.

New behavior

If you haven't explicitly set ImageList.ColorDepth for an image list, the color depth will automatically be reset to ColorDepth.Depth32Bit. This could increase your app's memory usage.

Change category

This change is a behavioral change.

Reason for change

The default value was changed to improve image quality.

If you want to continue using the previous color depth, explicitly set ImageList.ColorDepth to ColorDepth.Depth8Bit.

Affected APIs