ImageLibrary.AddCustomImage(ImageSource, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
直接通过已创建的 ImageSource 将自定义图像添加到库。
public Microsoft.VisualStudio.Imaging.Interop.IImageHandle AddCustomImage (System.Windows.Media.ImageSource bitmap, bool canTheme = true);
member this.AddCustomImage : System.Windows.Media.ImageSource * bool -> Microsoft.VisualStudio.Imaging.Interop.IImageHandle
Public Function AddCustomImage (bitmap As ImageSource, Optional canTheme As Boolean = true) As IImageHandle
参数
- bitmap
- ImageSource
要存储在库中的位图。
- canTheme
- Boolean
指示映像是否可以有主题
返回
一个包含与图像关联的名字对象的句柄。 句柄维护图像本身的对象生存期。 允许对句柄进行垃圾回收将导致映像也是垃圾回收。