影像服務與目錄

本操作手冊包含採用 Visual Studio 2015 中引進的 Visual Studio 映像服務與映像目錄的指引和最佳做法。

Visual Studio 2015 中引進的影像服務可讓開發人員取得裝置的最佳影像和使用者選擇的主題來顯示影像,包括針對顯示影像的內容更正主題。 採用影像服務將有助於消除與資產維護、HDPI 調整和主題相關的主要痛點。

今天的問題 方案
背景色彩混合 內建 Alpha 混合
主題 (部分) 影像 主題中繼資料
高對比模式 替代高對比資源
需要不同 DPI 模式的多個資源 具有向量型後援的可選取資源
重複的影像 每個影像概念一個識別碼

為什麼要採用影像服務?

  • 一律從 Visual Studio 取得最新的「像素完美」影像

  • 您可以提交並使用您自己的影像

  • 當 Windows 新增 DPI 縮放比例時,不需要測試您的影像

  • 解決實作中的舊架構障礙

    使用影像服務前後的 Visual Studio Shell 工具列:

    影像服務之前和之後

運作方式

影像服務可以提供適用於任何支援的 UI 架構的點陣圖影像:

  • WPF:BitmapSource

  • WinForms:System.Drawing.Bitmap

  • Win32:HBITMAP

    影像服務流程圖

    影像服務流程圖

    影像 Moniker

    影像 Moniker (或簡稱 Moniker) 是 GUID/ID 組,可唯一識別影像連結庫中的影像資產或影像清單資產。

    已知的 Moniker

    Visual Studio 影像目錄中包含的影像 Moniker 集合,並可由任何 Visual Studio 元件或擴充功能公開取用。

    影像資訊清單檔案

    影像資訊清單 (.imagemanifest) 檔案是 XML 檔案,可定義一組影像資產、代表這些資產的 Moniker,以及代表每個資產的一或多個實際影像。 影像資訊清單可以定義舊版 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

做為可讀性和維護輔助功能,影像資訊清單可以將符號用於屬性值。 符號的定義如下:

<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" />
</Symbols>
子元素 [定義]
Import 匯入指定資訊清單檔案的符號,以在目前資訊清單中使用
GUID 符號代表 GUID,而且必須符合 GUID 格式設定
識別碼 符號代表識別碼,而且必須是非負整數
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% 環境變數屬性的值
系統 Windows\System32 資料夾
WinDir %WinDir% 環境變數屬性的值

映像

<Image> 元素會定義Moniker 可參考的影像。 GUID 和識別碼會一起形成影像 Moniker。 影像的 Moniker 在整個影像庫中必須是唯一的。 如果有多個影像具有指定的 Moniker,建置影像庫時遇到的第一個影像就是保留的影像。

它必須至少包含一個來源。 大小中性來源會提供各種大小的最佳結果,但並非必要。 如果服務要求影像的大小未定義於 <Image> 元素中,而且沒有大小中性來源,服務會選擇最佳的大小特定來源,並將它調整為所要求的大小。

<Image Guid="guid" ID="int" AllowColorInversion="true/false">
      <Source ... />
      <!-- optional additional Source elements -->
</Image>
屬性 [定義]
GUID [必要] 影像 Moniker 的 GUID 部分
識別碼 [必要] 影像 Moniker 的 ID 部分
AllowColorInversion [選用,預設值 true] 指出影像是否可以在深色背景上使用時,以程式設計方式反轉其色彩。

來源

<Source> 元素會定義單一影像來源資產 (XAML 和 PNG)。

<Source Uri="uri" Background="background">
      <!-- optional NativeResource element -->
 </Source>
屬性 [定義]
URI [必要] 定義可從中載入影像的位置的 URI。 可以是下列其中一項:

- 使用 application:/// 授權單位的套件 URI
- 絕對元件資源參考
- 包含原生資源之檔案的路徑
背景 [選用] 指出來源要使用的背景類型。

可以是下列其中一項:

Light:來源可用於淺色背景。

Dark:來源可用於深色背景。

HighContrast:來源可以在高對比模式的任何背景上使用。

HighContrastLight:來源可以在高對比模式的淺色背景上使用。

HighContrastDark:來源可以在高對比模式的深色背景上使用。

如果省略 Background 屬性,則可以在任何背景上使用來源。

如果 [背景] 為 LightDarkHighContrastLightHighContrastDark,則來源的色彩永遠不會反轉。 如果省略 [背景] 或設定為 HighContrast,則來源色彩的反轉是由影像的 AllowColorInversion 屬性所控制。

<Source> 元素只能有下列其中一個選用子元素:

Element 屬性 (所有必要) [定義]
<大小> 來源將用於指定大小的影像 (以裝置單位表示)。 影像會是正方形的。
<SizeRange> MinSize、MaxSize 來源將用於從 MinSize 到 MaxSize (以裝置單位表示) 的影像。 影像會是正方形的。
<維度> 寬度, 高度 來源將用於指定寬度和高度的影像 (以裝置單位表示)。
<DimensionRange> MinWidth、MinHeight、

MaxWidth、MaxHeight
來源將用於從最小寬度/高度到最大寬度/高度 (以裝置單位表示) 的影像。

<Source> 元素也可以有選用的 <NativeResource> 子元素,其會定義從原生元件載入的 <[來源]>,而不是受控組件。

<NativeResource Type="type" ID="int" />
屬性 [定義]
類型 [必要] 原生資源的類型,XAML 或 PNG
識別碼 [必要] 原生資源的整數識別碼部分

ImageList

<ImageList> 元素會定義可在單一帶狀中傳回的影像集合。 視需要建置帶狀。

<ImageList>
      <ContainedImage Guid="guid" ID="int" External="true/false" />
      <!-- optional additional ContainedImage elements -->
 </ImageList>
屬性 [定義]
GUID [必要] 影像 Moniker 的 GUID 部分
識別碼 [必要] 影像 Moniker 的 ID 部分
外部 [選用,預設值 false] 指出影像 Moniker 是否參考目前資訊清單中的影像。

所含影像的 Moniker 不需要參考目前資訊清單中定義的影像。 如果影像庫中找不到所含影像,則會在其位置使用空白預留位置影像。

使用影像服務

首要步驟 (受控)

若要使用影像服務,您必須將下列部分或所有元件的參考新增至您的專案:

  • 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 中將 BrushToColorConverter 用於 ImageThemingUtilities.ImageBackgroundColor,則為必要。
  • 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),那麼您就可以略過 Utilities 的參考,因為您不需要轉換器。)

  2. 選取所需的影像並取得其 Moniker。 如果您有自己的自訂影像和 Moniker,請使用 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. 以 <CrispImage> 元素取代 UI 中的所有 <Image> 元素。

  2. 將所有 Source 屬性變更為 Moniker 屬性。

    • 如果影像永遠不會變更,而且您是使用 KnownMonikers,則請以靜態方式將該屬性繫結至 KnownMoniker。 (請參閱上述範例。)

    • 如果影像永遠不會變更,而且您使用自己的自訂影像,則請以靜態方式繫結至您自己的 Moniker。

    • 如果影像可以變更,請將 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

如何在新工具視窗中使用影像 Moniker?

VSIX 套件專案範本已針對 Visual Studio 2015 更新。 若要建立新的工具視窗,請以滑鼠右鍵按一下 VSIX 專案,然後選取 [新增]>[新增項目] (Ctrl+Shift+A)。 在專案語言的 [擴充性] 節點下,選取 [自訂工具視窗],為工具視窗命名,然後按 [新增] 按鈕。

這些是工具視窗中使用 Moniker 的主要位置。 遵循各項指示進行操作:

  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"/>
    

如何在現有的工具視窗中使用影像 Moniker?

更新現有的工具視窗以使用影像 Moniker,類似於建立新工具視窗的步驟。

這些是工具視窗中使用 Moniker 的主要位置。 遵循各項指示進行操作:

  1. 當索引標籤夠小時,工具視窗索引標 (也用於 Ctrl+Tab 視窗切換器)。

    1. 請移除衍生自 ToolWindowPane 類型的類別建構函式中的這幾行 (如果有的話):

      this.BitmapResourceID = <Value>;
      this.BitmapIndex = <Value>;
      
    2. 請參閱上述「如何在新工具視窗中使用影像 Moniker?」一節中的步驟 1。

  2. 開啟工具視窗的命令。

    • 請參閱上述「如何在新工具視窗中使用影像 Moniker?」一節中的步驟 2。

如何在 .vsct 檔案中使用影像 Moniker?

更新您的 .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 檔案的 <Bitmaps> 元素中定義的 GUID/ID 組對應至影像 Moniker 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”。

如何移植專案系統?

如何為專案提供 ImageMoniker

  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。 否則,實際的最外層類別可能無法在現實中支援影像 Moniker,而您的基底類別可能會有效地「隱藏」自訂影像。

    如何在 CPS 中使用影像 Moniker?

    在 CPS 中設定自訂影像 (通用專案系統) 可以手動完成,或透過專案系統擴充性 SDK 隨附的專案範本來完成。

    使用專案系統擴充性 SDK

    請依照為專案類型/項目類型提供自訂圖示中的指示自訂 CPS 影像。 如需 CPS 的詳細資訊,請參閱 Visual Studio Project System 擴充性文件

    手動使用 ImageMoniker

  4. 在您的專案系統中實作並匯出 IProjectTreeModifier 介面。

  5. 判斷您想要使用哪個 KnownMoniker 或自訂影像 Moniker。

  6. ApplyModifications 方法中,先在 方法中執行下列動作,再傳回新的樹狀結構,類似下列範例:

    // Replace this KnownMoniker with your desired ImageMoniker
    tree = tree.SetIcon(KnownMonikers.Blank.ToProjectSystemType());
    
  7. 如果您要建立新的樹狀結構,您可以透過將所需的 Moniker 傳入 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);
    

如何從實際影像帶狀轉換成 Moniker 型影像帶狀?

我需要支援 HIMAGELIST

如果您的程式碼已經有想要更新以使用影像服務的影像帶狀,但您受限於需要傳遞影像清單的 API,您仍然可以獲得影像服務的優勢。 若要建立 Moniker 型影像帶狀,請遵循下列步驟,從現有的 Moniker 建立資訊清單。

  1. 執行 ManifestFromResources 工具,並傳遞影像帶狀。 這會產生帶狀的資訊清單。

    • 建議:為資訊清單提供非預設名稱,以符合其使用方式。
  2. 如果您只使用 KnownMoniker,請執行下列動作:

    • 將資訊清單的 <[影像]> 區段取代為 <Images/>。

    • 移除所有子影像識別碼 (任何具有 <影像帶狀名稱>_## 的項目)。

    • 建議:重新命名 AssetsGuid 符號和影像帶狀符號,以符合其使用方式。

    • 將每個 ContainedImage 的 GUID 取代為 $(ImageCatalogGuid),將每個 ContainedImage 的 ID 取代為 $(<moniker>),然後將 External="true" 屬性新增至每個 ContainedImage

      • <moniker> 應取代為 KnownMoniker,它符合影像但名稱中會移除 "KnownMonikers"。
    • 將 <Import Manifest="$(ManifestFolder)\<相對安裝目錄路徑新增至 *>\Microsoft.VisualStudio.ImageCatalog.imagemanifest" /*> (新增至 <[符號]> 區段的頂端)。

      • 相對路徑是由資訊清單的安裝撰寫中所定義的部署位置所決定。
  3. 執行 ManifestToCode 工具來產生包裝函式,讓現有的程式碼具有可用來查詢影像帶狀之影像服務的 Moniker。

    • 建議:為包裝函式和命名空間提供非預設名稱,以符合其用法。
  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 集合,或為影像帶狀中的影像建立您自己的 Moniker。

  2. 更新您在影像帶狀中所需索引處取得影像的任何對應,以改用 Moniker。

  3. 更新您的程式碼,以使用影像服務透過更新的對應要求 Moniker。 (這可能表示更新至適用於受控程式碼的 CrispImages,或向影像服務要求 HBITMAP 或 HICON,並針對原生程式碼傳遞它們。)

測試您的影像

您可以使用影像庫檢視器工具來測試影像資訊清單,以確定所有項目都已正確撰寫。 您可以在 Visual Studio 2015 SDK 中找到此工具。 您可以在這裡找到此工具和其他工具的文件。

其他資源

範例

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

影像庫檢視器工具可以載入影像資訊清單,並讓使用者以相同的方式操作這些資訊清單,以確保已正確撰寫資訊清單。 使用者可以變更背景、大小、DPI 設定、高對比和其他設定。 它也會顯示載入資訊,以尋找資訊清單中的錯誤,並顯示資訊清單中每個影像的來源資訊。

常見問題集

  • 載入 <Reference Include="Microsoft.VisualStudio.*.Interop.14.0.DesignTime" /> 時,是否必須包含任何相依性?

    • 在所有 Interop DLL 上設定 EmbedInteropTypes="true"。
  • 如何使用我的擴充功能部署映像資訊清單嗎?

    • .imagemanifest 檔案新增至您的專案。

    • 將 [包含在 VSIX] 設定為 True。

  • 我正在更新 CPS 專案系統。 ImageNameStockIconService 發生了什麼情況?

    • 當 CPS 更新為使用 Moniker 時,會移除這些項目。 您不再需要呼叫 StockIconService,只要使用 CPS 公用程式中的 ToProjectSystemType() 擴充功能方法,將所需的 KnownMoniker 傳遞至方法或屬性即可。 您可以在下列位置找到從 ImageNameKnownMonikers 的對應:

      ImageName KnownMoniker
      ImageName.OfflineWebApp KnownImageIds.Web
      ImageName.WebReferencesFolder KnownImageIds.Web
      ImageName.OpenReferenceFolder KnownImageIds.FolderOpened
      ImageName.ReferenceFolder KnownImageIds.Reference
      ImageName.Reference KnownImageIds.Reference
      ImageName.SdlWebReference KnownImageIds.WebReferenceFolder
      ImageName.DiscoWebReference KnownImageIds.DynamicDiscoveryDocument
      ImageName.Folder KnownImageIds.FolderClosed
      ImageName.OpenFolder KnownImageIds.FolderOpened
      ImageName.ExcludedFolder KnownImageIds.HiddenFolderClosed
      ImageName.OpenExcludedFolder KnownImageIds.HiddenFolderOpened
      ImageName.ExcludedFile KnownImageIds.HiddenFile
      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
      ImageName.PreviewFile KnownImageIds.Report
      ImageName.DanglingReference KnownImageIds.ReferenceWarning
      ImageName.XsltFile KnownImageIds.XSLTransform
      ImageName.Cursor KnownImageIds.CursorFile
      ImageName.AppDesignerFolder KnownImageIds.Property
      ImageName.Data KnownImageIds.Database
      ImageName.Application 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
      ImageName.MissingFolder 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 值?

      名稱 名稱 名稱
      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 ConstantShortcut
      GlyphGroupDelegate GlyphItemPublic DelegatePublic
      GlyphGroupDelegate GlyphItemInternal DelegateInternal
      GlyphGroupDelegate GlyphItemFriend DelegateInternal
      GlyphGroupDelegate GlyphItemProtected DelegateProtected
      GlyphGroupDelegate GlyphItemPrivate DelegatePrivate
      GlyphGroupDelegate GlyphItemShortcut DelegateShortcut
      GlyphGroupEnum GlyphItemPublic EnumerationPublic
      GlyphGroupEnum GlyphItemInternal EnumerationInternal
      GlyphGroupEnum GlyphItemFriend EnumerationInternal
      GlyphGroupEnum GlyphItemProtected EnumerationProtected
      GlyphGroupEnum GlyphItemPrivate EnumerationPrivate
      GlyphGroupEnum GlyphItemShortcut EnumerationShortcut
      GlyphGroupEnumMember GlyphItemPublic EnumerationItemPublic
      GlyphGroupEnumMember GlyphItemInternal EnumerationItemInternal
      GlyphGroupEnumMember GlyphItemFriend EnumerationItemInternal
      GlyphGroupEnumMember GlyphItemProtected EnumerationItemProtected
      GlyphGroupEnumMember GlyphItemPrivate EnumerationItemPrivate
      GlyphGroupEnumMember GlyphItemShortcut EnumerationItemShortcut
      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 InterfaceShortcut
      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
      GlyphGroupMapItem GlyphItemPublic MapItemPublic
      GlyphGroupMapItem GlyphItemInternal MapItemInternal
      GlyphGroupMapItem GlyphItemFriend MapItemInternal
      GlyphGroupMapItem GlyphItemProtected MapItemProtected
      GlyphGroupMapItem GlyphItemPrivate MapItemPrivate
      GlyphGroupMapItem GlyphItemShortcut MapItemShortcut
      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 MethodShortcut
      GlyphGroupModule GlyphItemPublic ModulePublic
      GlyphGroupModule GlyphItemInternal ModuleInternal
      GlyphGroupModule GlyphItemFriend ModuleInternal
      GlyphGroupModule GlyphItemProtected ModuleProtected
      GlyphGroupModule GlyphItemPrivate ModulePrivate
      GlyphGroupModule GlyphItemShortcut ModuleShortcut
      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
      GlyphGroupOperator GlyphItemPrivate OperatorPrivate
      GlyphGroupOperator GlyphItemShortcut OperatorShortcut
      GlyphGroupProperty GlyphItemPublic PropertyPublic
      GlyphGroupProperty GlyphItemInternal PropertyInternal
      GlyphGroupProperty GlyphItemFriend PropertyInternal
      GlyphGroupProperty GlyphItemProtected PropertyProtected
      GlyphGroupProperty GlyphItemPrivate PropertyPrivate
      GlyphGroupProperty GlyphItemShortcut PropertyShortcut
      GlyphGroupStruct GlyphItemPublic StructurePublic
      GlyphGroupStruct GlyphItemInternal StructureInternal
      GlyphGroupStruct GlyphItemFriend StructureInternal
      GlyphGroupStruct GlyphItemProtected StructureProtected
      GlyphGroupStruct GlyphItemPrivate StructurePrivate
      GlyphGroupStruct GlyphItemShortcut StructureShortcut
      GlyphGroupTemplate GlyphItemPublic TemplatePublic
      GlyphGroupTemplate GlyphItemInternal TemplateInternal
      GlyphGroupTemplate GlyphItemFriend TemplateInternal
      GlyphGroupTemplate GlyphItemProtected TemplateProtected
      GlyphGroupTemplate GlyphItemPrivate TemplatePrivate
      GlyphGroupTemplate GlyphItemShortcut TemplateShortcut
      GlyphGroupTypedef GlyphItemPublic TypeDefinitionPublic
      GlyphGroupTypedef GlyphItemInternal TypeDefinitionInternal
      GlyphGroupTypedef GlyphItemFriend TypeDefinitionInternal
      GlyphGroupTypedef GlyphItemProtected TypeDefinitionProtected
      GlyphGroupTypedef GlyphItemPrivate TypeDefinitionPrivate
      GlyphGroupTypedef GlyphItemShortcut TypeDefinitionShortcut
      GlyphGroupType GlyphItemPublic TypePublic
      GlyphGroupType GlyphItemInternal TypeInternal
      GlyphGroupType GlyphItemFriend TypeInternal
      GlyphGroupType GlyphItemProtected TypeProtected
      GlyphGroupType GlyphItemPrivate TypePrivate
      GlyphGroupType GlyphItemShortcut TypeShortcut
      GlyphGroupUnion GlyphItemPublic UnionPublic
      GlyphGroupUnion GlyphItemInternal UnionInternal
      GlyphGroupUnion GlyphItemFriend UnionInternal
      GlyphGroupUnion GlyphItemProtected UnionProtected
      GlyphGroupUnion GlyphItemPrivate UnionPrivate
      GlyphGroupUnion GlyphItemShortcut UnionShortcut
      GlyphGroupVariable GlyphItemPublic FieldPublic
      GlyphGroupVariable GlyphItemInternal FieldInternal
      GlyphGroupVariable GlyphItemFriend FieldInternal
      GlyphGroupVariable GlyphItemProtected FieldProtected
      GlyphGroupVariable GlyphItemPrivate FieldPrivate
      GlyphGroupVariable GlyphItemShortcut FieldShortcut
      GlyphGroupValueType GlyphItemPublic ValueTypePublic
      GlyphGroupValueType GlyphItemInternal ValueTypeInternal
      GlyphGroupValueType GlyphItemFriend ValueTypeInternal
      GlyphGroupValueType GlyphItemProtected ValueTypeProtected
      GlyphGroupValueType GlyphItemPrivate ValueTypePrivate
      GlyphGroupValueType GlyphItemShortcut ValueTypeShortcut
      GlyphGroupIntrinsic GlyphItemPublic ObjectPublic
      GlyphGroupIntrinsic GlyphItemInternal ObjectInternal
      GlyphGroupIntrinsic GlyphItemFriend ObjectInternal
      GlyphGroupIntrinsic GlyphItemProtected ObjectProtected
      GlyphGroupIntrinsic GlyphItemPrivate ObjectPrivate
      GlyphGroupIntrinsic GlyphItemShortcut ObjectShortcut
      GlyphGroupJSharpMethod GlyphItemPublic MethodPublic
      GlyphGroupJSharpMethod GlyphItemInternal MethodInternal
      GlyphGroupJSharpMethod GlyphItemFriend MethodInternal
      GlyphGroupJSharpMethod GlyphItemProtected MethodProtected
      GlyphGroupJSharpMethod GlyphItemPrivate MethodPrivate
      GlyphGroupJSharpMethod GlyphItemShortcut MethodShortcut
      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
      GlyphGroupJSharpInterface GlyphItemShortcut InterfaceShortcut
      GlyphGroupError StatusError
      GlyphBscFile ClassFile
      GlyphAssembly 參考
      GlyphLibrary 程式庫
      GlyphVBProject VBProjectNode
      GlyphCoolProject CSProjectNode
      GlyphCppProject CPPProjectNode
      GlyphDialogId 對話
      GlyphOpenFolder FolderOpened
      GlyphClosedFolder FolderClosed
      GlyphArrow GoToNext
      GlyphCSharpFile CSFileNode
      GlyphCSharpExpansion 程式碼片段
      GlyphKeyword IntellisenseKeyword
      GlyphInformation StatusInformation
      GlyphReference ClassMethodReference
      GlyphRecursion 遞迴
      GlyphXmlItem 標籤
      GlyphJSharpProject DocumentCollection
      GlyphJSharpDocument Document
      GlyphForwardType GoToNext
      GlyphCallersGraph CallTo
      GlyphCallGraph CallFrom
      GlyphWarning StatusWarning
      GlyphMaybeReference QuestionMark
      GlyphMaybeCaller CallTo
      GlyphMaybeCall CallFrom
      GlyphExtensionMethod ExtensionMethod
      GlyphExtensionMethodInternal ExtensionMethod
      GlyphExtensionMethodFriend ExtensionMethod
      GlyphExtensionMethodProtected ExtensionMethod
      GlyphExtensionMethodPrivate ExtensionMethod
      GlyphExtensionMethodShortcut ExtensionMethod
      GlyphXmlAttribute XmlAttribute
      GlyphXmlChild XmlElement
      GlyphXmlDescendant XmlDescendant
      GlyphXmlNamespace XmlNamespace
      GlyphXmlAttributeQuestion XmlAttributeLowConfidence
      GlyphXmlAttributeCheck XmlAttributeHighConfidence
      GlyphXmlChildQuestion XmlElementLowConfidence
      GlyphXmlChildCheck XmlElementHighConfidence
      GlyphXmlDescendantQuestion XmlDescendantLowConfidence
      GlyphXmlDescendantCheck XmlDescendantHighConfidence
      GlyphCompletionWarning IntellisenseWarning