Default MenuItem TopLevelHeader Control Template

Where can I get the MenuItem TopLevelHeader Control Template? The MSDN link for styling menu items gives a modified template.

I need to obtain a control template that contains a default pop-up/context menu.


Manny tools are available that will serve the purpose like stylesnooper and Show Me The Template

but if you have Microsoft Expression Blend you can extract the default control template by

  1. Draggint the control onto the design surface
  2. Right click the control and choose Edit Template -> Edit Copy

When you do this, Blend will extract the base template from the control and explicitly declare it within document/application as a resource which you can then edit to your liking.

Check this for more

I could not get Blend or the usual tools to access that control template but you can extract it yourself with code like the following:

var controlTemplate = (ControlTemplate)FindResource(MenuItem.TopLevelHeaderTemplateKey);
var sb = new StringBuilder();
var xml = XmlWriter.Create(sb, new XmlWriterSettings { Indent = true, NewLineOnAttributes = true });
XamlWriter.Save(controlTemplate, xml);
var xaml = sb.ToString();

The output is too long to include here.

Need Your Help

mod_rewrite for specific domains in a mappings file

apache mod-rewrite mappings

I have a bunch of domains that I want to go to one domain but various parts of that domain.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.