#724 – Sample Code for Examining Control Templates

Charles Petzold, in his book Applications = Code + Markup, includes lots of useful sample code.  In chapter 25, talking about templates, he presents source code for a DumpControlTemplate project.  You can find the source code at http://www.microsoft.com/mspress/companion/0-7356-1957-3/.   Download the code samples and then look for the DumpControlTemplate project under chapter 25.

You start by selecting a control from the Control menu.

724-001

 

Once you select a control, the application will render the control in the top half of the window.  You can then select the template that you want to see from the Dump menu.  For example, we can choose to see the control template for a Button.

724-002

 

After you select the desired template, the XAML for that template is displayed in the main window.

724-003

 

(Note that you can select text in this window, right-click and select Copy).

Advertisement

#721 – A Tool for Viewing the Clipboard

Here’s a handy free tool for viewing the contents of the clipboard – Clipboard Master, by Jumping Bytes Software.

Once installed, you can press the Windows Key + V combination and a Clipboard Master window will pop up, showing you the full contents of the clipboard and allowing you to select an item to paste.  Notice that if there are multiple items on the clipboard, in different formats, you can choose which item to paste.

721-001

#511 – Blend Basics – The Tools Panel

When you start up Expression Blend, you’ll see a series of icons down the left side of the window.  Each icon represents a tool that you can use to work with elements in your application.  This area of the window is known as the Tools Panel.

This panel includes the following tools:

  •   Selection and Direct Selection – Select objects
  •    Pan – Slide the view in the artboard to see a different area of the GUI
  •     Zoom – Zoom in/out on the artboard
  •     Camera Orbit – Move the camera around in a 3D scene
  •     Eyedropper and Paint Bucket – Copy attributes from one object to another
  •     Gradient Tool – Create and edit gradient brushes
  •     Pen – Draw and modify paths
  •     Rectangle, Ellipse and Line – Draw a shape
  •     Grid et al – Add a layout panel
  •    TextBlock et al – Add a TextBox, Label or similar control
  •     Button et al – Add a Button, CheckBox or similar control