Partilhar via


ImageConverter.HiconFromBitmapSource(BitmapSource) Method

Definition

Converts a BitmapSource to an HICON. The caller is responsible for destroying the returned HICON. Do not call Icon.FromHandle expecting the returned Icon object to have ownership of the HICON.

public:
 static IntPtr HiconFromBitmapSource(System::Windows::Media::Imaging::BitmapSource ^ bitmapSource);
public static IntPtr HiconFromBitmapSource (System.Windows.Media.Imaging.BitmapSource bitmapSource);
static member HiconFromBitmapSource : System.Windows.Media.Imaging.BitmapSource -> nativeint
Public Shared Function HiconFromBitmapSource (bitmapSource As BitmapSource) As IntPtr

Parameters

bitmapSource
BitmapSource

Image to convert

Returns

IntPtr

nativeint

Converted icon

Applies to