One way that many developers like to create styles and templates for controls is to modify the existing styles and templates. An unusual feature of Silverlight is that every control in the toolbox is lookless – its appearance is determined by its own generic.xaml, just like the custom controls you create.
Finding this generic.xaml can be a bit tricky, as it is stored in a specially named resource file, but it is all documented on MSDN. That would be pretty good, but David Anson (aka "Delay") has created a wonderful desktop tool for inspecting (and copying) the styles and templates of the Silverlight controls
(Click on image for full size)
This is a really nice piece of work, allowing you to expand and collapse and spelunk the templates and styles and also to copy either or both to the clipboard to bring into your own code. I’ve added the circles and arrows to point out that the outline of elements is entirely collapsible and that the bottom of the browser offers a number of useful options.
I find this particularly useful in finding best practices for working around apparent limitations such as the changes to the ContentPresenter discussed on Sept 28.
Note that the link to the standalone tool includes the source code – but the program was written in WPF, not Silverlight. If you want the Clickonce version, you’ll want this link.
More Templates and Custom Controls