public static bool TrySetPalette(
this IWritableBitmapData bitmapData,
Palette palette
)
<ExtensionAttribute>
Public Shared Function TrySetPalette (
bitmapData As IWritableBitmapData,
palette As Palette
) As Boolean
public:
[ExtensionAttribute]
static bool TrySetPalette(
IWritableBitmapData^ bitmapData,
Palette^ palette
)
[<ExtensionAttribute>]
static member TrySetPalette :
bitmapData : IWritableBitmapData *
palette : Palette -> bool
Setting may fail if bitmapData PixelFormat is not an indexed one, the number of entries in palette is less than Count of the current Palette, the number of entries in palette is larger than the possible maximum number of colors of the current PixelFormat, or when the current IWritableBitmapData does not support setting the palette.
The Palette.BackColor and Palette.AlphaThreshold properties of the Palette property will continue to return the same value as the original BackColor and AlphaThreshold values of this bitmapData.
ArgumentNullException | bitmapData is . |