Compartilhar via


ImageLibrary.TryGetMonikerForExtension(String, Boolean, ImageMoniker) Method

Definition

Attempts to get the moniker for the image to use for files whose extension matches extension. If we haven't already identified the image to use, we'll attempt to identify it using the DefaultIcon property of the registered ProgID for the extension.

public:
 bool TryGetMonikerForExtension(System::String ^ extension, bool canTheme, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Imaging::Interop::ImageMoniker % moniker);
public bool TryGetMonikerForExtension (string extension, bool canTheme, out Microsoft.VisualStudio.Imaging.Interop.ImageMoniker moniker);
member this.TryGetMonikerForExtension : string * bool * ImageMoniker -> bool
Public Function TryGetMonikerForExtension (extension As String, canTheme As Boolean, ByRef moniker As ImageMoniker) As Boolean

Parameters

extension
String

The extension to reference

canTheme
Boolean

Indicates whether the image be themed

moniker
ImageMoniker

The moniker for the added image

Returns

True if the image could be added, false if it could not

Applies to