You should add a ComponentSerializationService service to the DesignSurface. In the HostSurface class in that sample you posted, add the following two lines of code in it would work fine.
Code Block
class HostSurface : DesignSurface
BasicDesignerLoader _loader;
private ISelectionService _selectionService;
public HostSurface() : base()
{
this.AddService(typeof(IMenuCommandService), new MenuCommandService(this));
this.AddService(typeof(ComponentSerializationService),
new CodeDomComponentSerializationService(this));
}
HostSurface(IServiceProvider parentProvider) : base(parentProvider)
{
this.AddService(typeof(IMenuCommandService), new MenuCommandService(this));
this.AddService(typeof(ComponentSerializationService),
new CodeDomComponentSerializationService(this));
}
……�/span>
|