<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Danny Thorpe &#187; VSIP</title>
	<atom:link href="http://dannythorpe.com/tag/vsip/feed/" rel="self" type="application/rss+xml" />
	<link>http://dannythorpe.com</link>
	<description>Dream &#38; Deliver</description>
	<lastBuildDate>Wed, 04 Jan 2012 21:20:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Menu Item Placement with Visual Studio .VSCT Groups and Priorities</title>
		<link>http://dannythorpe.com/2008/10/08/menu-item-placement-with-visual-studio-vsct-groups-and-priorities/</link>
		<comments>http://dannythorpe.com/2008/10/08/menu-item-placement-with-visual-studio-vsct-groups-and-priorities/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 16:09:23 +0000</pubDate>
		<dc:creator>Danny Thorpe</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VSCT]]></category>
		<category><![CDATA[VSIP]]></category>

		<guid isPermaLink="false">http://dannythorpe.com/2008/10/08/menu-item-placement-with-visual-studio-vsct-groups-and-priorities/</guid>
		<description><![CDATA[Here&#8217;s a quick note for a solution I discovered the hard way that isn&#8217;t covered well in the MSDN documentation:  If you are writing a Visual Studio extension and adding a menu item to an existing menu (such as the project context menu) using a .vsct (Visual Studio XML Command Table) file, the priority field of <a href='http://dannythorpe.com/2008/10/08/menu-item-placement-with-visual-studio-vsct-groups-and-priorities/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick note for a solution I discovered the hard way that isn&#8217;t covered well in the <a href="http://msdn.microsoft.com/en-us/library/bb166366.aspx">MSDN documentation</a>:  If you are writing a Visual Studio extension and adding a menu item to an existing menu (such as the project context menu) using a .vsct (Visual Studio XML Command Table) file, the priority field of the menu item has no effect on the placement of the item within the context menu.  If you want to position your new menu item above or below another item, you need to fiddle with the priority field of your menu item&#8217;s <em>group</em>.</p>
<p>The menu item&#8217;s priority affects the positioning of the item relative to other items within the same menu group.  The menu item&#8217;s group affects the positioning of its menu item(s) relative to other groups.  Since you can&#8217;t define a menu item without a group, macro level placement is controlled by the group priority, not the menu item priority.</p>
<p>The other challenge to positioning a new menu item where you want it within an existing VS menu is figuring out what the priorities are of the existing menu items/groups.  I found the <a href="http://code.msdn.microsoft.com/VSCTPowerToy">VSCT PowerToy</a> to be somewhat useful for this.  It&#8217;s difficult to use, but after fiddling with it for awhile and trying different search queries you&#8217;ll eventually figure out how to get what you&#8217;re looking for.</p>
<p>In my case, I was trying to add a new menu item to my project node&#8217;s context menu, and have the new menu item appear near the bottom of the context menu, but above the Properties menu which is traditionally always at the very bottom.  I needed to know what priority value the existing Properties group was using and the priority of the menus just before it so that I could set my menu&#8217;s group priority to something in between. </p>
<p>Searching for IDM_VS_CTXT_PROJNODE in VSCT PowerToy returns the project node&#8217;s context menu and all of the items within it.  From there you can browse through the menu items noting their priority values and pick the right value to position your menu where you want it.</p>
<div style="text-align:center;width:100%;"><div style="margin:0px 0px 0px 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-0861479594738165";
/* End of Post */
google_ad_slot = "6510912161";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div><p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;counturl=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;count=none&amp;text=Menu%20Item%20Placement%20with%20Visual%20Studio%20.VSCT%20Groups%20and%20Priorities" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;counturl=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;count=none&amp;text=Menu%20Item%20Placement%20with%20Visual%20Studio%20.VSCT%20Groups%20and%20Priorities" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdannythorpe.com%2F2008%2F10%2F08%2Fmenu-item-placement-with-visual-studio-vsct-groups-and-priorities%2F&amp;title=Menu%20Item%20Placement%20with%20Visual%20Studio%20.VSCT%20Groups%20and%20Priorities" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://dannythorpe.com/2008/10/08/menu-item-placement-with-visual-studio-vsct-groups-and-priorities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  dannythorpe.com/tag/vsip/feed/ ) in 0.34090 seconds, on Feb 7th, 2012 at 10:54 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 11:54 am UTC -->
