PageRenderTime 31ms CodeModel.GetById 16ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/CSVSPackageWPFToolWindow/CSVSPackageWPFToolWindow.vsct

#
Unknown | 114 lines | 81 code | 33 blank | 0 comment | 0 complexity | 7ef8380a09505f00970a3dfa71143489 MD5 | raw file
  1<?xml version="1.0" encoding="utf-8"?>
  2<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3
  4  <!--  This is the file that defines the actual layout and type of the commands.
  5        It is divided in different sections (e.g. command definition, command
  6        placement, ...), with each defining a specific set of properties.
  7        See the comment before each section for more details about how to
  8        use it. -->
  9
 10  <!--  The VSCT compiler (the tool that translates this file into the binary 
 11        format that VisualStudio will consume) has the ability to run a preprocessor 
 12        on the vsct file; this preprocessor is (usually) the C++ preprocessor, so 
 13        it is possible to define includes and macros with the same syntax used 
 14        in C++ files. Using this ability of the compiler here, we include some files 
 15        defining some of the constants that we will use inside the file. -->
 16
 17  <!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
 18  <Extern href="stdidcmd.h"/>
 19
 20  <!--This header contains the command ids for the menus provided by the shell. -->
 21  <Extern href="vsshlids.h"/>
 22
 23  <!--Definition of some VSCT specific constants. In this sample we use it for the IDs inside the guidOfficeIcon group. -->
 24  <Extern href="msobtnid.h"/>
 25
 26
 27
 28
 29
 30  <!--The Commands section is where we the commands, menus and menu groups are defined.
 31      This section uses a Guid to identify the package that provides the command defined inside it. -->
 32  <Commands package="guidVSPackageWPFToolWindowPkg">
 33    <!-- Inside this section we have different sub-sections: one for the menus, another  
 34    for the menu groups, one for the buttons (the actual commands), one for the combos 
 35    and the last one for the bitmaps used. Each element is identified by a command id that  
 36    is a unique pair of guid and numeric identifier; the guid part of the identifier is usually  
 37    called "command set" and is used to group different command inside a logically related  
 38    group; your package should define its own command set in order to avoid collisions  
 39    with command ids defined by other packages. -->
 40
 41    
 42    <!-- In this section you can define new menu groups. A menu group is a container for 
 43         other menus or buttons (commands); from a visual point of view you can see the 
 44         group as the part of a menu contained between two lines. The parent of a group 
 45         must be a menu. -->
 46    <Groups>
 47      
 48
 49
 50
 51    </Groups>
 52    
 53    <!--Buttons section. -->
 54    <!--This section defines the elements the user can interact with, like a menu command or a button 
 55        or combo box in a toolbar. -->
 56    <Buttons>
 57      <!--To define a menu group you have to specify its ID, the parent menu and its display priority. 
 58          Some commands are not defined as shared, so they use our package CLSID as the command set GUID. 
 59          Also, by specifying blank for the FLAGS, the command is default visible and enabled. Other valid 
 60          values for FLAGS are the following: DEFAULTDISABLED, DEFAULTINVISIBLE, DYNAMICVISIBILITY, TEXTCHANGES 
 61          
 62          These values for FLAGS can be or'ed together, e.g. "DEFAULTINVISIBLE | DYNAMICVISIBILITY" 
 63          If you do not want an image next to your command, set the image to "guidOfficeIcon:msotcidNoIcon" -->
 64
 65
 66      <Button guid="guidVSPackageWPFToolWindowCmdSet" id="cmdidWPFToolWindow" priority="0x0100" type="Button">
 67        <Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
 68        <Icon guid="guidImages" id="bmpPic2" />
 69        <Strings>
 70          <CommandName>cmdidWPFToolWindow</CommandName>
 71          <ButtonText>WPF Tool Window</ButtonText>
 72        </Strings>
 73      </Button>
 74
 75
 76    </Buttons>
 77   
 78    <!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
 79    <Bitmaps>
 80      <!--  The bitmap id is defined in a way that is a little bit different from the others: 
 81            the declaration starts with a guid for the bitmap strip, then there is the resource id of the 
 82            bitmap strip containing the bitmaps and then there are the numeric ids of the elements used 
 83            inside a button definition. An important aspect of this declaration is that the element id 
 84            must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
 85      <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
 86
 87    </Bitmaps>
 88 
 89  </Commands>
 90
 91
 92  <Symbols>
 93    <!-- This is the package guid. -->
 94    <GuidSymbol name="guidVSPackageWPFToolWindowPkg" value="{31921cf1-2895-4725-aec7-a9c6f994018b}" />
 95    
 96    <!-- This is the guid used to group the menu commands together -->
 97    <GuidSymbol name="guidVSPackageWPFToolWindowCmdSet" value="{43ef812a-a984-4b42-b80a-98151b688722}">
 98
 99      <IDSymbol name="MyMenuGroup" value="0x1020" />
100      <IDSymbol name="cmdidWPFToolWindow" value="0x0101" />
101    </GuidSymbol>
102    
103    
104    
105    <GuidSymbol name="guidImages" value="{81de379b-328a-4d5c-91e1-3111c17ef725}" >
106      <IDSymbol name="bmpPic1" value="1" />
107      <IDSymbol name="bmpPic2" value="2" />
108      <IDSymbol name="bmpPicSearch" value="3" />
109      <IDSymbol name="bmpPicX" value="4" />
110      <IDSymbol name="bmpPicArrows" value="5" />
111    </GuidSymbol>
112  </Symbols>
113
114</CommandTable>