public override void SetEditableDesignerRegionContent(EditableDesignerRegion region, string content)
{
var lvRegion = region as ReorderListDesignerRegion;
if(lvRegion == null)
return;
var host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
Debug.Assert(host != null, "IDesignerHost is null.");
var template = ControlParser.ParseTemplate(host, content);
using(var transaction = host.CreateTransaction("SetEditableDesignerRegionContent")) {
lvRegion.PropertyDescriptor.SetValue(lvRegion.Object, template);
transaction.Commit();
}
lvRegion.Template = template;
}