Show / Hide Table of Contents

Class ImageMonikerExtensions

Extension methods for the ImageMoniker class.

Inheritance
System.Object
ImageMonikerExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Microsoft.VisualStudio.Imaging.Interop
Assembly: Community.VisualStudio.Toolkit.dll
Syntax
public static class ImageMonikerExtensions

Methods

| Improve this Doc View Source

ToBitmapSourceAsync(ImageMoniker, Int32)

Converts an ImageMoniker to a bitmap in the specified size.

Declaration
public static Task<BitmapSource> ToBitmapSourceAsync(this ImageMoniker moniker, int size)
Parameters
Type Name Description
Microsoft.VisualStudio.Imaging.Interop.ImageMoniker moniker
System.Int32 size
Returns
Type Description
System.Threading.Tasks.Task<System.Windows.Media.Imaging.BitmapSource>
Remarks

The background color matches the one in the current Visual Studio theme and changes dynamically with changes to the applied theme.

Examples
BitmapSource bitmap = await KnownMonikers.Reference.ToBitmapSourceAsync(16);
| Improve this Doc View Source

ToUiObjectAsync(ImageMoniker, Int32)

Converts an ImageMoniker to an IVsUIObject in the specified size.

Declaration
public static Task<IVsUIObject> ToUiObjectAsync(this ImageMoniker moniker, int size)
Parameters
Type Name Description
Microsoft.VisualStudio.Imaging.Interop.ImageMoniker moniker
System.Int32 size
Returns
Type Description
System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.Interop.IVsUIObject>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX