BitmapPalette Constructor (IList<Color>^)
.NET Framework (current version)
Initializes a new instance of the BitmapPalette class with the specified colors.
Assembly: PresentationCore (in PresentationCore.dll)
| Exception | Condition |
|---|---|
| ArgumentNullException | The colors parameter is null. |
| InvalidOperationException | The colors parameter is less than 1 or greater than 256. |
The following example demonstrates how to define a custom BitmapPalette and apply it to a new BitmapSource.
.NET Framework
Available since 3.0
Available since 3.0
Show: