|
using System.ComponentModel;
using System.Web.UI.Design;
using ValidationAggregator;
namespace ValidationAggregator
{
public class ValidationTemplateDesigner : ControlDesigner
{
public override void Initialize(IComponent component)
{
base.Initialize(component);
SetViewFlags(ViewFlags.TemplateEditing, true);
}
public override string GetDesignTimeHtml()
{
return CreatePlaceHolderDesignTimeHtml();
}
public override TemplateGroupCollection TemplateGroups
{
get
{
TemplateGroupCollection collection = new TemplateGroupCollection();
TemplateGroup group;
TemplateDefinition template;
ValidationTemplate control;
control = (ValidationTemplate)Component;
group = new TemplateGroup("Item");
template = new TemplateDefinition(this, "Template", control, "Validators", true);
group.AddTemplateDefinition(template);
collection.Add(group);
return collection;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Fascinated by good architectures, well thought classes and clean code. I work as a software developer since 2004.