msdn上的
public class MyItemControlBuilder : ControlBuilder
{
// Override the GetChildControlType method to detect
// child elements named myitem.
public override Type GetChildControlType(String tagName,
IDictionary attributes)
{
if (String.Compare(tagName, "myitem", true) == 0)
{
return typeof(TextBox);
}
return null;
}
// Override the AppendLiteralString method so that literal
// text between rows of controls are ignored.
public override void AppendLiteralString(string s)
{
// Ignores literals between rows.
}
}