Datasheet

Figure 1-61: When you select a code snippet, a pop-up describes it.
Creating Snippets
To create a new snippet, you need to build an XML file containing the property tags to define the snippet
and any replacements that the user should make. The following code shows the
Create a public
property
snippet used in the previous section. The outer CodeSnippets and CodeSnippet tags are
standard and you should not change them.
Use the
Title tag in the Header section to describe the snippet.
Inside the
Snippet tag, build a Declarations section describing any literal text that the user should
replace. This example defines
DataType, Description, DefaultValue, and PropertyName symbols.
Each literal definition includes an
ID, and can include a ToolTip and Description.
After the declarations, the
Code tag contains the snippets source code. The syntax <![CDATA[...]]>
tells XML processors to include any characters including carriage returns between the <![CDATA[ and
the
]]> in the enclosing tag.
65
Chapter 1: IDE
37055c016.qxd 4/8/07 12:46 PM Page 65