图像服务和目录

这本实用手册为采用 Visual Studio 映像服务以及 Visual Studio 2015 中引入的映像目录提供指导和最佳实践。

Visual Studio 2015 中引入的图像服务允许开发人员获取设备的最佳图像和用户选择的主题以显示图像,包括更正显示图像的上下文主题。 采用映像服务将有助于消除与资产维护、HDPI 缩放和主题相关的主要难题。

今天的问题 解决方案
背景色混合 内置 alpha 混合
对部分图像进行主题定制 主题元数据
高对比度模式 替代高对比度资源
需要用于不同 DPI 模式的多个资源 基于矢量回退的可选资源
重复图像 每个图像概念的一个标识符

为什么采用映像服务?

  • 始终从 Visual Studio 获取最新的“像素完美”图像

  • 可以提交和使用自己的图像

  • 当 Windows 添加新的 DPI 缩放时,无需测试图像

  • 解决实现中的旧体系结构障碍问题

    使用映像服务前后的 Visual Studio shell 工具栏:

    映像服务前后

工作原理

图像服务可以提供适合任何受支持的 UI 框架的位图图像:

  • WPF:BitmapSource

  • WinForms:System.Drawing.Bitmap

  • Win32:HBITMAP

    图像服务流图

    图像服务流图

    图像标志

    图像标识符(简称标识符)是一个 GUID/ID 组合,用于唯一鉴别图像库中的图像资产或图像列表资产。

    已知别名

    Visual Studio 映像目录中包含的图像名字对象集,可由任何 Visual Studio 组件或扩展公开使用。

    镜像清单文件

    图像清单(.imagemanifest)文件是定义一组图像资产的 XML 文件、表示这些资产的名字对象,以及表示每个资产的真实图像或图像。 映像清单可以为旧版 UI 支持定义独立映像或映像列表。 此外,还可以在每个资产后面的单个图像上设置属性,以更改这些资产的显示时间和方式。

    映像清单架构

    完整的映像清单如下所示:

<ImageManifest>
      <!-- zero or one Symbols elements -->
      <Symbols>
        <!-- zero or more Import, Guid, ID, or String elements -->
      </Symbols>
      <!-- zero or one Images elements -->
      <Images>
        <!-- zero or more Image elements -->
      </Images>
      <!-- zero or one ImageLists elements -->
      <ImageLists>
        <!-- zero or more ImageList elements -->
      </ImageLists>
</ImageManifest>

符号

作为增加可读性和维护特性的功能,映像清单可以使用符号来表示属性值。 符号的定义如下所示:

<Symbols>
      <Import Manifest="manifest" />
      <Guid Name="ShellCommandGuid" Value="8ee4f65d-bab4-4cde-b8e7-ac412abbda8a" />
      <ID Name="cmdidSaveAll" Value="1000" />
      <String Name="AssemblyName" Value="Microsoft.VisualStudio.Shell.UI.Internal" />
      <!-- If your assembly is strongly named, you'll need the version and public key token as well -->
      <!-- <String Name="AssemblyName" Value="Microsoft.VisualStudio.Shell.UI.Internal;v17.0.0.0;b03f5f7f11d50a3a" /> -->
</Symbols>
子元素 定义
Import 导入给定清单文件的符号,以便在当前清单中使用
Guid 符号表示 GUID,必须与 GUID 格式匹配
ID 符号表示 ID,必须是非负整数
String 符号表示任意字符串值

符号区分大小写,并使用 $(symbol-name) 语法引用:

<Image Guid="$(ShellCommandGuid)" ID="$(cmdidSaveAll)" >
      <Source Uri="/$(AssemblyName);Component/Resources/image.xaml" />
</Image>

一些符号已为所有清单预先定义。 可以在 Source< 或 >Import< 元素的 >Uri 属性中使用这些属性来引用本地计算机上的路径。

符号 说明
CommonProgramFiles %CommonProgramFiles% 环境变量的值
LocalAppData %LocalAppData% 环境变量的值
ManifestFolder 包含清单文件的文件夹
MyDocuments 当前用户的“我的文档”文件夹的完整路径
ProgramFiles %ProgramFiles% 环境变量的值
System Windows\System32 文件夹
WinDir %WinDir% 环境变量的值

图像

<Image> 元素定义可由标识符引用的图像。 GUID 和 ID 共同构成图像标识符。 图像的名称在整个图像库中必须是唯一的。 如果多个图像具有相同的标识符,则在构建库时遇到的第一个图像会被保留。

它必须至少包含一个源。 大小无关的源能够在各种大小范围内提供最佳结果,但并非必需。 如果要求服务提供未在 <Image> 元素中定义的大小的图像,并且没有不依赖大小的源,则服务将选择与请求大小最匹配的特定来源并缩放到请求的大小。

<Image Guid="guid" ID="int" AllowColorInversion="true/false">
      <Source ... />
      <!-- optional additional Source elements -->
</Image>
属性 定义
Guid [必需]图像标识符的 GUID 部分
ID [必需]图像标识的 ID 部分
允许颜色反转 [可选,默认值为 true]指示图像在深色背景上使用时是否可以以编程方式反转其颜色。

来源

<Source> 元素定义单个图像源资产(XAML 和 PNG)。

<Source Uri="uri" Background="background">
      <!-- optional NativeResource element -->
 </Source>
属性 定义
Uri [必需]一个 URI,用于定义可从中加载图像的位置。 它可以是下列项之一:

- 使用 application:/// 授权的Pack URI
- 绝对组件资源参考
- 包含本机资源的文件的路径
背景 [可选]指示源要使用的背景类型。

它可以是下列项之一:

光: 该源适合用于浅色背景。

深色: 源可以用于深色背景。

HighContrast: 源可在高对比度模式下的任何背景上使用。

HighContrastLight: 该源可以在高对比度模式下的浅色背景上使用。

HighContrastDark: 源可以在高对比度模式下的深色背景上使用。

如果省略 Background 属性,则可以在任何背景上使用源。

如果背景为 浅色深色HighContrastLightHighContrastDark,则源的颜色永远不会反转。 如果省略背景或设置为 HighContrast,则源颜色的反转由图像的 AllowColorInversion 属性控制。

<Source> 元素可以正好具有以下可选子元素之一:

元素 属性(全部必需) 定义
<大小> 价值 此源将用于指定大小的图像(以设备为单位)。 图像将为正方形。
<尺寸范围> MinSize、MaxSize 源将用于从 MinSize 到 MaxSize(以设备单位为单位)的图像(包括在内)。 图像将为正方形。
<尺寸> 宽度、高度 源将用于给定宽度和高度的图像(以设备单位为单位)。
<DimensionRange> MinWidth、MinHeight、

MaxWidth、MaxHeight
源将用于从最小宽度/高度到最大宽度/高度(以设备单位为单位)的图像。

<Source> 元素还可以具有可选的 <NativeResource> 子元素,该子元素定义<从本机程序集而不是托管程序集加载的源>。

<NativeResource Type="type" ID="int" />
属性 定义
类型 [必需]本机资源的类型,即 XAML 或 PNG
ID [必需]本机资源的整数 ID 部分

ImageList

<ImageList> 元素定义可在单个条带中返回的图像集合。 条带按需构建,视需要而定。

<ImageList>
      <ContainedImage Guid="guid" ID="int" External="true/false" />
      <!-- optional additional ContainedImage elements -->
 </ImageList>
属性 定义
Guid [必需]图像标识符的 GUID 部分
ID [必需]图像标识的 ID 部分
External [可选,默认值 false]指示图像名字对象是否引用当前清单中的图像。

包含图像的名称不必引用当前清单中定义的图像。 如果在图像库中找不到包含的图像,则会在其位置使用空白占位符图像。

使用映像服务

第一步(托管)

若要使用图像服务,您需要向项目中添加对下列部分或全部程序集的引用:

  • Microsoft.VisualStudio.ImageCatalog.dll

    • 如果使用内置映像目录 KnownMonikers,则为必需。
  • Microsoft.VisualStudio.Imaging.dll

    • 如果在 WPF UI 中使用 CrispImageImageThemingUtilities ,则是必需的。
  • Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime.dll

    • 如果使用 ImageMonikerImageAttributes 类型,则为必需。

    • EmbedInteropTypes 应设置为 true。

  • Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime

    • 如果使用 IVsImageService2 类型,则是必需的。

    • EmbedInteropTypes 应设置为 true。

  • Microsoft.VisualStudio.Utilities.dll

    • 如果对 WPF UI 中的 ImageThemingUtilities.ImageBackgroundColor 使用 BrushToColorConverter,则为必需。
  • Microsoft.VisualStudio.Shell.<VSVersion>.0

    • 如果使用 IVsUIObject 类型,则是必需的。
  • Microsoft.VisualStudio.Shell.Interop.10.0.dll

    • 如果使用与 WinForms 相关的 UI 辅助程序,则这是必需的。

    • EmbedInteropTypes 应设置为 true

第一步(本地)

若要使用图像服务,需要向项目添加以下部分或全部标头:

  • KnownImageIds.h

    • 在使用内置映像目录 KnownMonikers 时,如果无法使用 ImageMoniker 类型,例如从 IVsHierarchy GetGuidPropertyGetProperty 调用返回值,那么这是必需的。
  • KnownMonikers.h

    • 如果使用内置映像目录 KnownMonikers,则为必需。
  • ImageParameters140.h

    • 如果使用 ImageMonikerImageAttributes 类型, 则是必需的。
  • VSShell140.h

    • 如果使用 IVsImageService2 类型,则是必需的。
  • ImageThemingUtilities.h

    • 如果无法让图片服务为你处理主题设计,这就是必需的。

    • 如果图像服务可以处理图像主题,请不要使用此标头。

  • VsDpiAwareness.h

    • 如果使用 DPI 感知帮助程序来查询当前 DPI,则该帮助程序是必需的。

如何编写新的 WPF UI?

  1. 首先将上述第一步部分所需的程序集引用添加到项目。 无需添加所有这些引用,因此只需添加所需的引用。 (注意:如果您正在使用或有权访问 Colors 而不是 Brushes,则可以跳过对 工具的引用,因为不需要使用转换器。)

  2. 选择所需的图像并获取其标识符。 如果您有自己的自定义图像和标识符,请使用它们,否则使用KnownMoniker

  3. CrispImages 添加到 XAML。 (请参阅以下示例。

  4. 在 UI 层次结构中设置 ImageThemingUtilities.ImageBackgroundColor 属性。 (这应在背景色已知位置设置,不一定在 CrispImage 上设置。(请参阅以下示例。

<Window
  x:Class="WpfApplication.MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
  xmlns:theming="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Imaging"
  xmlns:utilities="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Utilities"
  xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
  Title="MainWindow" Height="350" Width="525" UseLayoutRounding="True">
  <Window.Resources>
    <utilities:BrushToColorConverter x:Key="BrushToColorConverter"/>
  </Window.Resources>
  <StackPanel Background="White" VerticalAlignment="Center"
    theming:ImageThemingUtilities.ImageBackgroundColor="{Binding Background, RelativeSource={RelativeSource Self}, Converter={StaticResource BrushToColorConverter}}">
    <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.MoveUp}" />
  </StackPanel>
</Window>

如何更新现有的 WPF UI?

更新现有 WPF UI 是一个相对简单的过程,其中包含三个基本步骤:

  1. 将 UI 中的所有 <图像> 元素替换为 <CrispImage> 元素。

  2. 将所有 Source 属性更改为 Moniker 属性。

    • 如果图像永远不会更改,并且使用的是 KnownMonikers,则静态将该属性绑定到 KnownMoniker。 (请参阅上面的示例。

    • 如果镜像永远不会更改,并且你使用的是自己的自定义镜像,则静态绑定到自己的标识符。

    • 如果图像可以更改,请将 Moniker 属性绑定到一个能够通知属性更改的代码属性。

  3. 在 UI 层次结构中的某个位置,设置 ImageThemingUtilities.ImageBackgroundColor 以确保颜色反转正常工作。

    • 这可能需要使用 BrushToColorConverter 类。 (请参阅上面的示例。

如何更新 Win32 UI?

在适当位置将以下内容添加到代码中,以替换图像的原始加载。 根据需要切换返回 HBITMAP 与 HICON 与 HIMAGELIST 的值。

获取镜像服务

CComPtr<IVsImageService2> spImgSvc;
CGlobalServiceProvider::HrQueryService(SID_SVsImageService, &spImgSvc);

请求映像

UINT dpiX, dpiY;
HWND hwnd = // get the HWND where the image will be displayed
VsUI::CDpiAwareness::GetDpiForWindow(hwnd, &dpiX, &dpiY);

ImageAttributes attr = { 0 };
attr.StructSize      = sizeof(attributes);
attr.Format          = DF_Win32;
// IT_Bitmap for HBITMAP, IT_Icon for HICON, IT_ImageList for HIMAGELIST
attr.ImageType       = IT_Bitmap;
attr.LogicalWidth    = 16;
attr.LogicalHeight   = 16;
attr.Dpi             = dpiX;
// Desired RGBA color, if you don't use this, don't set IAF_Background below
attr.Background      = 0xFFFFFFFF;
attr.Flags           = IAF_RequiredFlags | IAF_Background;

CComPtr<IVsUIObject> spImg;
// Replace this KnownMoniker with your desired ImageMoniker
spImgSvc->GetImage(KnownMonikers::Blank, attributes, &spImg);

如何更新 WinForms UI?

在适当位置将以下内容添加到代码中,以替换图像的原始加载。 根据需要切换值,以返回位图或图标。

有用的使用语句

using GelUtilities = Microsoft.Internal.VisualStudio.PlatformUI.Utilities;

获取图像服务

// This or your preferred way of querying for Visual Studio services
IVsImageService2 imageService = (IVsImageService2)Package.GetGlobalService(typeof(SVsImageService));

请求映像

Control control = // get the control where the image will be displayed

ImageAttributes attributes = new ImageAttributes
{
    StructSize    = Marshal.SizeOf(typeof(ImageAttributes)),
    // IT_Bitmap for Bitmap, IT_Icon for Icon, IT_ImageList for ImageList
    ImageType     = (uint)_UIImageType.IT_Bitmap,
    Format        = (uint)_UIDataFormat.DF_WinForms,
    LogicalWidth  = 16,
    LogicalHeight = 16,
    Dpi           = (int)DpiAwareness.GetWindowDpi(control.Handle);
    // Desired RGBA color, if you don't use this, don't set IAF_Background below
    Background    = 0xFFFFFFFF,
    Flags         = unchecked((uint)_ImageAttributesFlags.IAF_RequiredFlags | _ImageAttributesFlags.IAF_Background),
};

// Replace this KnownMoniker with your desired ImageMoniker
IVsUIObject uIObj = imageService.GetImage(KnownMonikers.Blank, attributes);

Bitmap bitmap = (Bitmap)GelUtilities.GetObjectData(uiObj); // Use this if you need a bitmap
// Icon icon = (Icon)GelUtilities.GetObjectData(uiObj);    // Use this if you need an icon

如何在新的工具窗口中使用图像标识符?

VSIX 包项目模板已针对 Visual Studio 2015 进行了更新。 若要创建新工具窗口,请右键单击 VSIX 项目,然后选择“ 添加新> ”(Ctrl+Shift+A)。 在项目语言的扩展性节点下,选择 “自定义工具窗口”,为工具窗口命名,然后按 “添加 ”按钮。

以下是在工具窗口中使用名字对象的关键位置。 按照每项的说明进行操作:

  1. 当选项卡足够小时,工具窗口选项卡(也用于 Ctrl+Tab 窗口切换器)。

    将此行添加到派生自 ToolWindowPane 类型的类的构造函数:

    // Replace this KnownMoniker with your desired ImageMoniker
    this.BitmapImageMoniker = KnownMonikers.Blank;
    
  2. 用于打开工具窗口的命令。

    .vsct 包的文件中,编辑工具窗口的命令按钮:

    <Button guid="guidPackageCmdSet" id="CommandId" priority="0x0100" type="Button">
      <Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
      <!-- Replace this KnownMoniker with your desired ImageMoniker -->
      <Icon guid="ImageCatalogGuid" id="Blank" />
      <!-- Add this -->
      <CommandFlag>IconIsMoniker</CommandFlag>
      <Strings>
        <ButtonText>MyToolWindow</ButtonText>
      </Strings>
    </Button>
    

    确保文件顶部 <Extern> 元素之后也存在以下内容:

    <Include href="KnownImageIds.vsct"/>
    

如何在现有工具窗口中使用图像标记符?

更新现有工具窗口以使用图像名字对象类似于创建新工具窗口的步骤。

以下是在工具窗口中使用标识符的关键位置。 按照每个步骤的说明进行操作:

  1. 当选项卡缩小到一定程度时,工具窗口选项卡(也用于Ctrl+Tab 窗口切换器)。

    1. 删除派生自 ToolWindowPane 类型的类的构造函数中的这些行(如果存在):

      this.BitmapResourceID = <Value>;
      this.BitmapIndex = <Value>;
      
    2. 请参阅上面的“如何在新的工具窗口中使用图像名字对象?”部分的步骤 1。

  2. 用于打开工具窗口的命令。

    • 请参阅上面的“如何在新的工具窗口中使用图像名字对象?”部分的步骤 2。

如何在 .vsct 文件中使用图像标识符?

.vsct按以下注释行指示更新文件:

<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <!--  Include the definitions for images included in the VS image catalog -->
  <Include href="KnownImageIds.vsct"/>
  <Commands package="guidMyPackage">
    <Buttons>
      <Button guid="guidMyCommandSet" id="cmdidMyCommand" priority="0x0000" type="Button">
        <!-- Add an Icon element, changing the attributes to match the image moniker you want to use.
             In this case, we're using the Guid for the VS image catalog.
             Change the id attribute to be the ID of the desired image moniker. -->
        <Icon guid="ImageCatalogGuid" id="OpenFolder" />
        <CommandFlag>DynamicVisibility</CommandFlag>
        <CommandFlag>DefaultInvisible</CommandFlag>
        <CommandFlag>DefaultDisabled</CommandFlag>
        <CommandFlag>CommandWellOnly</CommandFlag>
        <CommandFlag>IconAndText</CommandFlag>
        <!-- Add the IconIsMoniker CommandFlag -->
        <CommandFlag>IconIsMoniker</CommandFlag>
        <Strings>
          <ButtonText>Quick Fixes...</ButtonText>
          <CommandName>Show Quick Fixes</CommandName>
          <CanonicalName>ShowQuickFixes</CanonicalName>
          <LocCanonicalName>ShowQuickFixes</LocCanonicalName>
        </Strings>
      </Button>
    </Buttons>
  </Commands>
  <!-- It is recommended that you remove <Bitmap> elements that are no longer used in the vsct file -->
  <Symbols>
    <GuidSymbol name="guidMyPackage"    value="{1491e936-6ffe-474e-8371-30e5920d8fdd}" />
    <GuidSymbol name="guidMyCommandSet" value="{10347de4-69a9-47f4-a950-d3301f6d2bc7}">
      <IDSymbol name="cmdidMyCommand" value="0x9437" />
    </GuidSymbol>
  </Symbols>
</CommandTable>

如果我的 .vsct 文件还需要由较旧版本的 Visual Studio 读取,该怎么办?

较旧版本的 Visual Studio 无法识别 IconIsMoniker 命令标志。 可以在支持映像的 Visual Studio 版本上使用图像服务中的映像,但继续使用旧版 Visual Studio 上的旧样式图像。 为此,请将.vsct文件保留不变(从而确保与早期版本的 Visual Studio 兼容),并创建一个 CSV(逗号分隔值)文件,该文件将.vsct文件中定义的 GUID/ID 对从<Bitmaps>元素映射到图像标识符括 GUID/ID 对。

映射 CSV 文件的格式为:

Icon guid, Icon id, Moniker guid, Moniker id
b714fcf7-855e-4e4c-802a-1fd87144ccad,1,fda30684-682d-421c-8be4-650a2967058e,100
b714fcf7-855e-4e4c-802a-1fd87144ccad,2,fda30684-682d-421c-8be4-650a2967058e,200

CSV 文件随包一起部署,其位置由 ProvideMenuResource 包属性的 IconMappingFilename 属性指定:

[ProvideMenuResource("MyPackage.ctmenu", 1, IconMappingFilename="IconMappings.csv")]

IconMappingFilename 是隐式植根于 $PackageFolder$ (如上例)的相对路径,或显式植根于环境变量定义的目录的绝对路径,如 @“%UserProfile%\dir1\dir2\MyMappingFile.csv”

如何移植项目系统?

如何为项目提供 ImageMonikers

  1. 在项目的 IVsHierarchy 上实现 VSHPROPID_SupportsIconMonikers,并返回 true。

  2. 实现 VSHPROPID_IconMonikerImageList (如果原始项目使用了 VSHPROPID_IconImgList)或 VSHPROPID_IconMonikerGuidVSHPROPID_IconMonikerIdVSHPROPID_OpenFolderIconMonikerGuidVSHPROPID_OpenFolderIconMonikerId (如果原始项目使用了 VSHPROPID_IconHandleVSHPROPID_OpenFolderIconHandle)。

  3. 更改图标的原始 VSHPROPID 的实现,以便在扩展点请求它们时创建图标的“旧”版本。 IVsImageService2 提供获取这些图标所需的功能

    VB/C# 项目风格的额外要求

    仅当检测到项目是最外层风味时,才实现VSHPROPID_SupportsIconMonikers。 否则,实际最外层的版本在现实中可能不支持图像标识符,并且您的基本版本可能会有效地“隐藏”自定义图像。

    如何在 CPS 中使用图像标识?

    可以手动或通过 Project System 扩展性 SDK 附带的项模板在 CPS(通用项目系统)中设置自定义映像。

    使用 Project System Extensibility SDK

    请按照为项目类型/项类型提供自定义图标中的指示,自定义您的CPS图像。 有关 CPS 的详细信息,请参阅 Visual Studio Project System 扩展性文档

    手动使用 ImageMonikers

  4. 在项目系统中实现和导出 IProjectTreeModifier 接口。

  5. 确定要使用的 KnownMoniker 或自定义图像标识符。

  6. ApplyModifications 方法中,在返回新树之前,在方法中执行以下作,类似于以下示例:

    // Replace this KnownMoniker with your desired ImageMoniker
    tree = tree.SetIcon(KnownMonikers.Blank.ToProjectSystemType());
    
  7. 如果要创建新树,可以通过将所需标识传入 NewTree 方法来设置自定义图像,类似于以下示例:

    // Replace this KnownMoniker with your desired ImageMoniker
    ProjectImageMoniker icon         = KnownMonikers.FolderClosed.ToProjectSystemType();
    ProjectImageMoniker expandedIcon = KnownMonikers.FolderOpened.ToProjectSystemType();
    
    return this.ProjectTreeFactory.Value.NewTree(/*caption*/<value>,
                                                 /*filePath*/<value>,
                                                 /*browseObjectProperties*/<value>,
                                                 icon,
                                                 expandedIcon);
    

如何将真实图像条转换为基于标识符的图像条?

我需要支持 HIMAGELIST

如果代码已有一个现有的图像序列,你希望更新以使用图像服务,但因 API 需要传递图像列表而受到限制,你仍然可以获得图像服务的好处。 若要创建基于名称符的图像条带,请按照以下步骤从现有名称符创建清单文件。

  1. 运行 ManifestFromResources 工具,向其传递映像条带。 这将为条带创建一个清单文件。

    • 建议:为清单提供一个非默认名称,以满足其用法。
  2. 如果仅使用 KnownMonikers,请执行以下操作:

    • 将<清单的“映像”部分替换为 >Images</>。

    • 删除所有子映像 ID(任何带有 <imagestrip name>_## 的 ID)。

    • 建议:重命名 AssetsGuid 符号和图像条带符号以适应其用法。

    • 将每个 ContainedImage 的 GUID 替换为 $(ImageCatalogGuid),将每个 ContainedImage 的 ID 替换为 $(<标识>),并将 External="true" 属性添加到每个 ContainedImage

      • <名字对象> 应替换为与图像匹配的 KnownMoniker ,但从名称中删除了“KnownMonikers”。
    • 将 <Import Manifest=“$(ManifestFolder)\<Relative install dir path to *>\Microsoft.VisualStudio.ImageCatalog.imagemanifest” /*> 添加到 Symbols< 节顶部>。

      • 相对路径由在设置编制中定义的清单部署位置确定。
  3. 运行 ManifestToCode 工具以生成封装器,从而使现有代码具有一个标识符,能够用于查询图像带的图像服务。

    • 建议:为包装器和命名空间提供非默认名称以满足其用法。
  4. 进行所有添加、配置编写/部署以及代码更改,以用于映像服务和新文件。

    示例清单,包括内部和外部映像,以便了解它应有的样子。

<?xml version="1.0"?>
<ImageManifest
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://schemas.microsoft.com/VisualStudio/ImageManifestSchema/2014">

  <Symbols>
    <!-- This needs to be the relative path from your manifest to the ImageCatalog's manifest
         where $(ManifestFolder) is the deployed location of this manifest. -->
    <Import Manifest="$(ManifestFolder)\<RelPath>\Microsoft.VisualStudio.ImageCatalog.imagemanifest" />

    <String Name="Resources" Value="/My.Assembly.Name;Component/Resources/ImageStrip" />
    <Guid Name="ImageGuid" Value="{fb41b7ef-6587-480c-aa27-5b559d42cfc9}" />
    <Guid Name="ImageStripGuid" Value="{9c84a570-d9a7-4052-a340-188fb276f973}" />
    <ID Name="MyImage_0" Value="100" />
    <ID Name="MyImage_1" Value="101" />
    <ID Name="InternalList" Value="1001" />
    <ID Name="ExternalList" Value="1002" />
  </Symbols>

  <Images>
    <Image Guid="$(ImageGuid)" ID="$(MyImage_0)">
      <Source Uri="$(Resources)/MyImage_0.png">
        <Size Value="16" />
      </Source>
    </Image>
    <Image Guid="$(ImageGuid)" ID="$(MyImage_1)">
      <Source Uri="$(Resources)/MyImage_1.png">
        <Size Value="16" />
      </Source>
    </Image>
  </Images>

  <ImageLists>
    <ImageList Guid="$(ImageStripGuid)" ID="$(InternalList)">
      <ContainedImage Guid="$(ImageGuid)" ID="$(MyImage_0)" />
      <ContainedImage Guid="$(ImageGuid)" ID="$(MyImage_1)" />
    </ImageList>
    <ImageList Guid="$(ImageStripGuid)" ID="$(ExternalList)">
      <ContainedImage Guid="$(ImageCatalogGuid)" ID="$(StatusError)" External="true" />
      <ContainedImage Guid="$(ImageCatalogGuid)" ID="$(StatusWarning)" External="true" />
      <ContainedImage Guid="$(ImageCatalogGuid)" ID="$(StatusInformation)" External="true" />
    </ImageList>
  </ImageLists>

</ImageManifest>

我不需要支持 HIMAGELIST

  1. 确定与图像带中的图像匹配的 KnownMonikers 集合,或为图像带中的图像创建自己的标识符。

  2. 更新您用于在图像条中获取所需索引处图像的任何映射,以改用代号。

  3. 将您的代码更新为使用图像服务通过更新的映射请求标识符。 (这可能意味着更新到 CrispImages 以用于托管代码,或者从映像服务请求 HBITMAP 或 HICON,并将它们传递给本机代码。)

测试您的图像

可以使用图像库查看工具测试图像清单,以确保所有内容的编制正确无误。 可以在 Visual Studio 2015 SDK 中找到该工具。 可 在此处找到此工具和其他工具的文档。

其他资源

Samples

GitHub 上的多个 Visual Studio 示例已更新,演示如何将图像服务用作各种 Visual Studio 扩展点的一部分。

查看最新示例 http://github.com/Microsoft/VSSDK-Extensibility-Samples

工具

为映像服务创建了一组支持工具,以帮助创建/更新适用于映像服务的 UI。 有关每个工具的详细信息,请查看工具附带的文档。 这些工具包含在 Visual Studio 2015 SDK 中。

ManifestFromResources

“资源清单”工具获取映像资源列表(PNG 或 XAML),并生成映像清单文件,以便将这些映像与图像服务一起使用。

ManifestToCode

清单到代码工具获取映像清单文件,并生成一个包装文件来引用代码(C++、C# 或 VB)或 .vsct 文件中的清单值。

ImageLibraryViewer

图像库查看器工具可以加载图像清单,并允许用户以与 Visual Studio 相同的方式操作它们,以确保清单被正确撰写。 用户可以更改背景、大小、DPI 设置、高对比度和其他设置。 它还显示加载信息以查找清单中的错误,并显示清单中每个图像的源信息。

FAQ

  • 在加载<Reference Include="Microsoft.VisualStudio.*.Interop.14.0.DesignTime" />时,是否有任何必须包含的依赖项?

    • 在所有互操作 DLL 上设置 EmbedInteropTypes=“true”。
  • 如何通过扩展程序部署映像清单?

    • .imagemanifest 文件添加到项目。

    • 将“在 VSIX 中包含”设置为 True。

  • 我的图像仍然不起作用,如何弄清楚什么是错误的?

    • Visual Studio 可能找不到图像清单。 出于性能原因,Visual Studio 会限制文件夹搜索深度,因此建议将映像清单保留在扩展的根文件夹中。

    • 映像清单文件中可能缺少程序集信息。 强名称的程序集需要额外的信息才能被 Visual Studio 加载。 为了加载强名称程序集,除了程序集名称,还需要在映像清单中的映像的资源 URI 中包含程序集版本和公钥令牌。

      <ImageManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/VisualStudio/ImageManifestSchema/2014">
        <Symbols>
          <String Name="Resources" Value="/Microsoft.VisualStudio.Shell.UI.Internal;v17.0.0.0;b03f5f7f11d50a3a;Component/Resources" />
          ...
        </Symbols>
        ...
      </ImageManifest>
      
    • 你可能缺少映像程序集的代码库条目。 如果程序集在 Visual Studio 需要时尚未加载,则需要知道在何处查找程序集才能加载它。 若要为程序集添加代码库,可以使用 ProvideCodeBaseAttribute 来确保生成代码库条目并将其包含在扩展的 pkgdef 中。

      [assembly: ProvideCodeBase(AssemblyName = "ClassLibrary1", Version = "1.0.0.0", CodeBase = "$PackageFolder$\\ClassLibrary1.dll")]
      
    • 如果上述选项无法解决映像加载问题,可以通过将以下条目拖放到扩展中的 pkgdef 中来启用日志记录:

      [$RootKey$\ImageLibrary]
      "TraceLevel"="Verbose"
      "TraceFilename"="ImageLibrary.log"
      

      这将在 %UserProfile% 文件夹中创建名为ImageLibrary.log的日志文件。 将这些条目添加到 pkgdef 后,请务必从开发人员命令提示符处运行“devenv /updateConfiguration”。 这可确保启用日志记录条目,并且 VS 会刷新映像清单缓存,以帮助查找读取映像清单时可能发生的任何错误。 如果您随后运行期望加载映像的场景,日志文件将会同时包含映像的注册日志和请求日志。

  • 我正在更新 CPS 项目系统。 ImageNameStockIconService 发生了什么情况?

    • 当 CPS 更新为使用标识符时,将删除这些属性。 不再需要调用 StockIconService,只需使用 CPS 实用工具中的 ToProjectSystemType() 扩展方法将所需的 KnownMoniker 传递给方法或属性。 可以在下面找到从 ImageNameKnownMonikers 的映射:

      ImageName KnownMoniker
      ImageName.OfflineWebApp KnownImageIds.Web
      ImageName.WebReferencesFolder KnownImageIds.Web
      ImageName.OpenReferenceFolder 已知图像ID.文件夹已打开
      ImageName.参考文件夹 KnownImageIds.Reference
      ImageName.Reference KnownImageIds.Reference
      ImageName.SdlWebReference KnownImageIds.WebReferenceFolder
      ImageName.DiscoWebReference KnownImageIds.动态发现文档
      ImageName.Folder KnownImageIds.FolderClosed
      图片名称.打开文件夹 KnownImageIds.FolderOpened
      ImageName.ExcludedFolder KnownImageIds.HiddenFolderClosed
      图像名称.打开已排除文件夹 已知图像ID.隐藏文件夹已打开
      ImageName.ExcludedFile 已知图像ID.隐藏文件
      ImageName.DependentFile KnownImageIds.GenerateFile
      ImageName.MissingFile KnownImageIds.DocumentWarning
      ImageName.WindowsForm KnownImageIds.WindowsForm
      ImageName.WindowsUserControl KnownImageIds.UserControl(已知图像标识符.用户控件)
      ImageName.WindowsComponent KnownImageIds.ComponentFile
      ImageName.XmlSchema KnownImageIds.XMLSchema
      ImageName.XmlFile KnownImageIds.XMLFile
      ImageName.WebForm KnownImageIds.Web
      ImageName.WebService KnownImageIds.WebService
      ImageName.WebUserControl KnownImageIds.WebUserControl
      ImageName.WebCustomUserControl KnownImageIds.WebCustomControl
      ImageName.AspPage KnownImageIds.ASPFile
      ImageName.GlobalApplicationClass KnownImageIds.SettingsFile
      ImageName.WebConfig KnownImageIds.ConfigurationFile
      ImageName.HtmlPage KnownImageIds.HTMLFile
      ImageName.StyleSheet KnownImageIds.StyleSheet
      ImageName.ScriptFile KnownImageIds.JSScript
      ImageName.TextFile KnownImageIds.Document
      ImageName.SettingsFile KnownImageIds.Settings
      ImageName.Resources KnownImageIds.DocumentGroup
      ImageName.Bitmap KnownImageIds.Image
      ImageName.Icon KnownImageIds.IconFile
      ImageName.Image KnownImageIds.Image
      ImageName.ImageMap KnownImageIds.ImageMapFile
      ImageName.XWorld KnownImageIds.XWorldFile
      ImageName.Audio KnownImageIds.Sound
      ImageName.Video KnownImageIds.Media
      ImageName.Cab KnownImageIds.CABProject
      ImageName.Jar KnownImageIds.JARFile
      ImageName.DataEnvironment KnownImageIds.DataTable
      图像名称.预览文件 KnownImageIds.Report
      ImageName.DanglingReference KnownImageIds.ReferenceWarning
      ImageName.XsltFile KnownImageIds.XSLTransform
      ImageName.Cursor KnownImageIds.CursorFile
      ImageName.AppDesignerFolder KnownImageIds.Property
      ImageName.Data KnownImageIds.Database
      ImageName.应用程序 KnownImageIds.Application
      ImageName.DataSet KnownImageIds.DatabaseGroup
      ImageName.Pfx KnownImageIds.Certificate
      ImageName.Snk KnownImageIds.Rule
      ImageName.VisualBasicProject KnownImageIds.VBProjectNode
      ImageName.CSharpProject KnownImageIds.CSProjectNode
      ImageName.Empty KnownImageIds.Blank
      图像名称.缺少文件夹 KnownImageIds.FolderOffline
      ImageName.SharedImportReference(共享导入引用) KnownImageIds.SharedProject
      ImageName.SharedProjectCs KnownImageIds.CSSharedProject
      ImageName.SharedProjectVc KnownImageIds.CPPSharedProject
      ImageName.SharedProjectJs KnownImageIds.JSSharedProject
      ImageName.CSharpCodeFile KnownImageIds.CSFileNode
      ImageName.VisualBasicCodeFile KnownImageIds.VBFileNode
  • 我正在更新我的自动完成列表提供程序。 哪些 KnownMonikers 与旧的 StandardGlyphGroupStandardGlyph 值匹配?

    Name Name Name
    GlyphGroupClass GlyphItemPublic ClassPublic
    GlyphGroupClass GlyphItemInternal ClassInternal
    GlyphGroupClass GlyphItemFriend ClassInternal
    GlyphGroupClass GlyphItemProtected ClassProtected
    GlyphGroupClass GlyphItemPrivate ClassPrivate
    GlyphGroupClass GlyphItemShortcut ClassShortcut
    GlyphGroupConstant GlyphItemPublic ConstantPublic
    GlyphGroupConstant GlyphItemInternal ConstantInternal (常内部变量)
    GlyphGroupConstant GlyphItemFriend ConstantInternal
    GlyphGroupConstant GlyphItemProtected ConstantProtected
    GlyphGroupConstant GlyphItemPrivate ConstantPrivate
    GlyphGroupConstant GlyphItemShortcut 常量快捷方式
    GlyphGroupDelegate GlyphItemPublic DelegatePublic
    GlyphGroupDelegate GlyphItemInternal DelegateInternal
    GlyphGroupDelegate GlyphItemFriend 内部委派
    GlyphGroupDelegate GlyphItemProtected 委托保护
    GlyphGroupDelegate GlyphItemPrivate DelegatePrivate
    GlyphGroupDelegate GlyphItemShortcut 代表快捷方式
    GlyphGroupEnum GlyphItemPublic EnumerationPublic
    GlyphGroupEnum GlyphItemInternal EnumerationInternal
    GlyphGroupEnum GlyphItemFriend EnumerationInternal
    GlyphGroupEnum GlyphItemProtected 枚举受保护
    GlyphGroupEnum GlyphItemPrivate EnumerationPrivate
    GlyphGroupEnum GlyphItemShortcut 枚举快捷方式
    GlyphGroupEnumMember GlyphItemPublic 枚举项公共
    GlyphGroupEnumMember GlyphItemInternal EnumerationItemInternal
    GlyphGroupEnumMember GlyphItemFriend EnumerationItemInternal
    GlyphGroupEnumMember GlyphItemProtected 枚举项受保护
    GlyphGroupEnumMember GlyphItemPrivate EnumerationItemPrivate
    GlyphGroupEnumMember GlyphItemShortcut 枚举项快捷方式
    GlyphGroupEvent GlyphItemPublic EventPublic
    GlyphGroupEvent GlyphItemInternal EventInternal
    GlyphGroupEvent GlyphItemFriend EventInternal
    GlyphGroupEvent GlyphItemProtected EventProtected
    GlyphGroupEvent GlyphItemPrivate EventPrivate
    GlyphGroupEvent GlyphItemShortcut EventShortcut
    GlyphGroupException GlyphItemPublic ExceptionPublic
    GlyphGroupException GlyphItemInternal ExceptionInternal
    GlyphGroupException GlyphItemFriend ExceptionInternal
    GlyphGroupException GlyphItemProtected ExceptionProtected
    GlyphGroupException GlyphItemPrivate ExceptionPrivate
    GlyphGroupException(字形组异常) GlyphItemShortcut ExceptionShortcut
    GlyphGroupField GlyphItemPublic FieldPublic
    GlyphGroupField GlyphItemInternal FieldInternal
    GlyphGroupField GlyphItemFriend FieldInternal
    GlyphGroupField GlyphItemProtected FieldProtected
    GlyphGroupField GlyphItemPrivate FieldPrivate
    GlyphGroupField GlyphItemShortcut FieldShortcut
    GlyphGroupInterface GlyphItemPublic InterfacePublic
    GlyphGroupInterface GlyphItemInternal InterfaceInternal
    GlyphGroupInterface GlyphItemFriend InterfaceInternal
    GlyphGroupInterface GlyphItemProtected InterfaceProtected
    GlyphGroupInterface GlyphItemPrivate InterfacePrivate
    GlyphGroupInterface GlyphItemShortcut 界面快捷方式
    GlyphGroupMacro GlyphItemPublic MacroPublic
    GlyphGroupMacro GlyphItemInternal MacroInternal
    GlyphGroupMacro GlyphItemFriend MacroInternal
    GlyphGroupMacro GlyphItemProtected MacroProtected
    GlyphGroupMacro GlyphItemPrivate MacroPrivate
    GlyphGroupMacro GlyphItemShortcut MacroShortcut
    GlyphGroupMap GlyphItemPublic MapPublic
    GlyphGroupMap GlyphItemInternal MapInternal
    GlyphGroupMap GlyphItemFriend MapInternal
    GlyphGroupMap GlyphItemProtected MapProtected
    GlyphGroupMap GlyphItemPrivate MapPrivate
    GlyphGroupMap GlyphItemShortcut MapShortcut
    字形组映射项 GlyphItemPublic MapItemPublic
    GlyphGroupMapItem GlyphItemInternal MapItemInternal
    字形组映射项 GlyphItemFriend MapItemInternal
    字形组映射项 GlyphItemProtected MapItemProtected
    字形组映射项 GlyphItemPrivate MapItemPrivate
    字形组映射项 GlyphItemShortcut 地图项目快捷方式
    GlyphGroupMethod GlyphItemPublic MethodPublic
    GlyphGroupMethod GlyphItemInternal MethodInternal
    GlyphGroupMethod GlyphItemFriend MethodInternal
    GlyphGroupMethod GlyphItemProtected MethodProtected
    GlyphGroupMethod GlyphItemPrivate MethodPrivate
    GlyphGroupMethod GlyphItemShortcut MethodShortcut
    GlyphGroupOverload GlyphItemPublic MethodPublic
    GlyphGroupOverload GlyphItemInternal MethodInternal
    GlyphGroupOverload GlyphItemFriend MethodInternal
    字形组重载 (GlyphGroupOverload) GlyphItemProtected MethodProtected
    GlyphGroupOverload GlyphItemPrivate MethodPrivate
    GlyphGroupOverload GlyphItemShortcut Method快捷方式
    GlyphGroupModule GlyphItemPublic ModulePublic
    GlyphGroupModule GlyphItemInternal ModuleInternal
    GlyphGroupModule GlyphItemFriend ModuleInternal
    GlyphGroupModule GlyphItemProtected ModuleProtected
    GlyphGroupModule GlyphItemPrivate ModulePrivate
    GlyphGroupModule GlyphItemShortcut 模块快捷方式
    GlyphGroupNamespace GlyphItemPublic NamespacePublic
    GlyphGroupNamespace GlyphItemInternal NamespaceInternal
    GlyphGroupNamespace GlyphItemFriend NamespaceInternal
    GlyphGroupNamespace GlyphItemProtected NamespaceProtected
    GlyphGroupNamespace GlyphItemPrivate NamespacePrivate
    GlyphGroupNamespace GlyphItemShortcut NamespaceShortcut
    GlyphGroupOperator GlyphItemPublic OperatorPublic
    GlyphGroupOperator GlyphItemInternal OperatorInternal
    GlyphGroupOperator GlyphItemFriend OperatorInternal
    GlyphGroupOperator GlyphItemProtected OperatorProtected
    字形组操作器 GlyphItemPrivate OperatorPrivate
    GlyphGroupOperator GlyphItemShortcut 操作员快捷方式
    GlyphGroupProperty GlyphItemPublic PropertyPublic
    GlyphGroupProperty GlyphItemInternal PropertyInternal
    GlyphGroupProperty GlyphItemFriend PropertyInternal
    GlyphGroupProperty GlyphItemProtected PropertyProtected
    GlyphGroupProperty GlyphItemPrivate PropertyPrivate
    GlyphGroupProperty GlyphItemShortcut 属性快捷方式
    GlyphGroupStruct GlyphItemPublic StructurePublic
    GlyphGroupStruct GlyphItemInternal StructureInternal
    GlyphGroupStruct GlyphItemFriend 结构内置
    GlyphGroupStruct GlyphItemProtected 结构保护
    GlyphGroupStruct GlyphItemPrivate 私有结构体
    GlyphGroupStruct GlyphItemShortcut 结构快捷方式
    GlyphGroupTemplate GlyphItemPublic TemplatePublic
    GlyphGroupTemplate GlyphItemInternal TemplateInternal
    GlyphGroupTemplate GlyphItemFriend TemplateInternal
    GlyphGroupTemplate GlyphItemProtected 模板保护
    GlyphGroupTemplate GlyphItemPrivate TemplatePrivate
    GlyphGroupTemplate GlyphItemShortcut 模板快捷方式
    GlyphGroupTypedef GlyphItemPublic 类型定义公共
    GlyphGroupTypedef GlyphItemInternal TypeDefinitionInternal
    GlyphGroupTypedef GlyphItemFriend TypeDefinitionInternal
    GlyphGroupTypedef GlyphItemProtected TypeDefinitionProtected
    GlyphGroupTypedef GlyphItemPrivate TypeDefinitionPrivate
    GlyphGroupTypedef GlyphItemShortcut 类型定义快捷方式
    GlyphGroupType GlyphItemPublic TypePublic
    GlyphGroupType GlyphItemInternal TypeInternal
    GlyphGroupType GlyphItemFriend TypeInternal
    GlyphGroupType GlyphItemProtected TypeProtected
    GlyphGroupType GlyphItemPrivate TypePrivate
    GlyphGroupType GlyphItemShortcut 类型快捷键
    GlyphGroupUnion GlyphItemPublic UnionPublic
    GlyphGroupUnion GlyphItemInternal UnionInternal
    GlyphGroupUnion GlyphItemFriend UnionInternal
    GlyphGroupUnion GlyphItemProtected UnionProtected
    GlyphGroupUnion GlyphItemPrivate UnionPrivate
    GlyphGroupUnion GlyphItemShortcut UnionShortcut
    GlyphGroupVariable GlyphItemPublic FieldPublic
    GlyphGroupVariable GlyphItemInternal FieldInternal
    字形组变量 GlyphItemFriend FieldInternal
    字形组变量 GlyphItemProtected FieldProtected
    GlyphGroupVariable GlyphItemPrivate FieldPrivate
    GlyphGroupVariable GlyphItemShortcut FieldShortcut
    GlyphGroupValueType GlyphItemPublic ValueTypePublic
    GlyphGroupValueType GlyphItemInternal ValueTypeInternal
    字形组值类型 GlyphItemFriend ValueTypeInternal
    GlyphGroupValueType GlyphItemProtected ValueTypeProtected
    GlyphGroupValueType GlyphItemPrivate ValueTypePrivate
    GlyphGroupValueType GlyphItemShortcut ValueTypeShortcut
    GlyphGroupIntrinsic GlyphItemPublic ObjectPublic
    GlyphGroupIntrinsic GlyphItemInternal ObjectInternal
    GlyphGroupIntrinsic GlyphItemFriend ObjectInternal
    GlyphGroupIntrinsic GlyphItemProtected 对象保护
    GlyphGroupIntrinsic GlyphItemPrivate ObjectPrivate
    GlyphGroupIntrinsic GlyphItemShortcut 对象快捷方式
    GlyphGroupJSharpMethod GlyphItemPublic MethodPublic
    GlyphGroupJSharpMethod GlyphItemInternal MethodInternal
    GlyphGroupJSharpMethod GlyphItemFriend MethodInternal
    GlyphGroupJSharpMethod GlyphItemProtected MethodProtected
    GlyphGroupJSharpMethod GlyphItemPrivate MethodPrivate
    GlyphGroupJSharpMethod GlyphItemShortcut Method快捷方式
    GlyphGroupJSharpField GlyphItemPublic FieldPublic
    GlyphGroupJSharpField GlyphItemInternal FieldInternal
    GlyphGroupJSharpField GlyphItemFriend FieldInternal
    GlyphGroupJSharpField GlyphItemProtected FieldProtected
    GlyphGroupJSharpField GlyphItemPrivate FieldPrivate
    GlyphGroupJSharpField GlyphItemShortcut FieldShortcut
    GlyphGroupJSharpClass GlyphItemPublic ClassPublic
    GlyphGroupJSharpClass GlyphItemInternal ClassInternal
    GlyphGroupJSharpClass GlyphItemFriend ClassInternal
    GlyphGroupJSharpClass GlyphItemProtected ClassProtected
    GlyphGroupJSharpClass GlyphItemPrivate ClassPrivate
    GlyphGroupJSharpClass GlyphItemShortcut ClassShortcut
    GlyphGroupJSharpNamespace GlyphItemPublic NamespacePublic
    GlyphGroupJSharpNamespace GlyphItemInternal NamespaceInternal
    GlyphGroupJSharpNamespace GlyphItemFriend NamespaceInternal
    GlyphGroupJSharpNamespace GlyphItemProtected NamespaceProtected
    GlyphGroupJSharpNamespace GlyphItemPrivate NamespacePrivate
    GlyphGroupJSharpNamespace GlyphItemShortcut NamespaceShortcut
    GlyphGroupJSharpInterface GlyphItemPublic InterfacePublic
    GlyphGroupJSharpInterface GlyphItemInternal InterfaceInternal
    GlyphGroupJSharpInterface GlyphItemFriend InterfaceInternal
    GlyphGroupJSharpInterface GlyphItemProtected InterfaceProtected
    GlyphGroupJSharpInterface GlyphItemPrivate InterfacePrivate
    GlyphGroupJSharp接口 GlyphItemShortcut 界面快捷方式
    GlyphGroupError StatusError
    GlyphBscFile ClassFile
    GlyphAssembly Reference
    GlyphLibrary 图书馆
    GlyphVBProject VBProjectNode
    GlyphCoolProject CSProjectNode
    GlyphCppProject CPPProjectNode
    GlyphDialogId Dialog
    GlyphOpenFolder 文件夹已打开
    GlyphClosedFolder 文件夹关闭
    GlyphArrow GoToNext
    GlyphCSharpFile CSFileNode
    GlyphCSharpExpansion 片段
    GlyphKeyword IntellisenseKeyword
    GlyphInformation 状态信息
    GlyphReference ClassMethodReference
    GlyphRecursion 递归
    GlyphXmlItem 标记
    GlyphJSharpProject DocumentCollection
    GlyphJSharpDocument 文档
    GlyphForwardType GoToNext
    GlyphCallersGraph CallTo
    GlyphCallGraph CallFrom
    GlyphWarning StatusWarning
    GlyphMaybeReference QuestionMark
    GlyphMaybeCaller CallTo
    GlyphMaybeCall CallFrom
    GlyphExtensionMethod 扩展方法 (ExtensionMethod)
    GlyphExtensionMethodInternal 扩展方法
    GlyphExtensionMethodFriend 扩展方法
    GlyphExtensionMethodProtected 扩展方法 (ExtensionMethod)
    GlyphExtensionMethodPrivate 扩展方法
    GlyphExtensionMethodShortcut (字形扩展方法快捷方式) 扩展方法 (ExtensionMethod)
    GlyphXmlAttribute XmlAttribute
    GlyphXmlChild XmlElement
    GlyphXmlDescendant XML子代
    GlyphXmlNamespace XmlNamespace
    GlyphXml属性问题 XmlAttributeLowConfidence
    GlyphXmlAttributeCheck XML属性高置信度
    GlyphXmlChildQuestion XML元素低置信度
    GlyphXmlChildCheck XML元素高置信度
    GlyphXmlDescendantQuestion XML后代低置信度
    GlyphXmlDescendantCheck XmlDescendantHighConfidence
    GlyphCompletionWarning(字形完成警告) IntellisenseWarning