次の方法で共有


ImageLibrary.AddCustomImage Method

Definition

Overloads

AddCustomImage(IEnumerable<String>, Boolean)
AddCustomImage(ImageSource, Boolean)

Adds a custom image to the library, directly via an already-created ImageSource.

AddCustomImage(IEnumerable<String>, Boolean)

public Microsoft.VisualStudio.Imaging.Interop.IImageHandle AddCustomImage (System.Collections.Generic.IEnumerable<string> sources, bool canTheme = true);
member this.AddCustomImage : seq<string> * bool -> Microsoft.VisualStudio.Imaging.Interop.IImageHandle
Public Function AddCustomImage (sources As IEnumerable(Of String), Optional canTheme As Boolean = true) As IImageHandle

Parameters

sources
IEnumerable<String>
canTheme
Boolean

Returns

Applies to

AddCustomImage(ImageSource, Boolean)

Adds a custom image to the library, directly via an already-created 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

Parameters

bitmap
ImageSource

The bitmap to store in the library.

canTheme
Boolean

Indicates whether the image can be themed

Returns

A handle which contains the moniker associated with the image. The handle maintains the object lifetime of the image itself. Allowing the handle to be garbage-collected will result in the image also being GC-eligible.

Applies to