Compartilhar via


IVsImageService2.TryAssociateNameWithMoniker(String, ImageMoniker) Method

Definition

Creates an association between an image name (from IVsImageService.Add and IVsImageService.Get) and an ImageMoniker (from IVsImageService.GetImage).

public:
 bool TryAssociateNameWithMoniker(System::String ^ imageName, Microsoft::VisualStudio::Imaging::Interop::ImageMoniker moniker);
bool TryAssociateNameWithMoniker(std::wstring const & imageName, Microsoft::VisualStudio::Imaging::Interop::ImageMoniker moniker);
public bool TryAssociateNameWithMoniker (string imageName, Microsoft.VisualStudio.Imaging.Interop.ImageMoniker moniker);
abstract member TryAssociateNameWithMoniker : string * Microsoft.VisualStudio.Imaging.Interop.ImageMoniker -> bool
Public Function TryAssociateNameWithMoniker (imageName As String, moniker As ImageMoniker) As Boolean

Parameters

imageName
String

The image name.

moniker
ImageMoniker

The image moniker.

Returns

True if the moniker was successfully associated with the name, false if some other moniker is already registered.

Applies to