다음을 통해 공유


IVsImageService.GetIconForFile Method

Gets the 16x16 icon for the specified file.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
Function GetIconForFile ( _
    filename As String, _
    desiredFormat As __VSUIDATAFORMAT _
) As IVsUIObject
IVsUIObject GetIconForFile(
    string filename,
    __VSUIDATAFORMAT desiredFormat
)
IVsUIObject^ GetIconForFile(
    [InAttribute] String^ filename, 
    [InAttribute] __VSUIDATAFORMAT desiredFormat
)
abstract GetIconForFile : 
        filename:string * 
        desiredFormat:__VSUIDATAFORMAT -> IVsUIObject
function GetIconForFile(
    filename : String, 
    desiredFormat : __VSUIDATAFORMAT
) : IVsUIObject

Parameters

  • filename
    Type: String

    [in] The file name of the icon.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsUIObject
The icon object. Returns null if the icon cannot be retrieved.

.NET Framework Security

See Also

Reference

IVsImageService Interface

Microsoft.VisualStudio.Shell.Interop Namespace